From b6ac7cba1fdd76d07806f53d1fd0435535a1effb Mon Sep 17 00:00:00 2001
From: Anders Blomdell <anders.blomdell@control.lth.se>
Date: Thu, 22 Apr 2021 21:53:17 +0200
Subject: [PATCH] Add missing flush flags

---
 plugins/serial2002/serial2002.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/plugins/serial2002/serial2002.c b/plugins/serial2002/serial2002.c
index dbc902c..59fe2ab 100644
--- a/plugins/serial2002/serial2002.c
+++ b/plugins/serial2002/serial2002.c
@@ -242,7 +242,7 @@ static struct moberg_status analog_in_read(
     result = batch_sampling(device, &map,  NULL, NULL, &data);
     if (! OK(result)) { goto return_result; }
   } else {
-    result = serial2002_poll_channel(&device->port.io, map.index, 0);
+    result = serial2002_poll_channel(&device->port.io, map.index, 1);
     if (! OK(result)) { goto return_result; }
     result = serial2002_read(&device->port.io, device->port.timeout, &data);
     if (! OK(result)) { goto return_result; }
@@ -351,7 +351,7 @@ static struct moberg_status encoder_in_read(
     result = batch_sampling(device, NULL, NULL, &map, &data);
     if (! OK(result)) { goto return_result; }
   } else {
-    result = serial2002_poll_channel(&device->port.io, map.index, 0);
+    result = serial2002_poll_channel(&device->port.io, map.index, 1);
     if (! OK(result)) { goto return_result; }
     result = serial2002_read(&device->port.io, device->port.timeout, &data);
     if (! OK(result)) { goto return_result; }
-- 
GitLab