From e83011e1784dd7361e7e6152eccaa31561faac28 Mon Sep 17 00:00:00 2001
From: David Hammer <dhammer@mailbox.org>
Date: Thu, 31 Aug 2023 10:24:02 +0200
Subject: [PATCH] Only update output channel once per input

---
 src/calng/PickyBoi.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/calng/PickyBoi.py b/src/calng/PickyBoi.py
index 72392c67..e66ceb46 100644
--- a/src/calng/PickyBoi.py
+++ b/src/calng/PickyBoi.py
@@ -308,9 +308,9 @@ class PickyBoi(PythonDevice):
                     self.log.INFO(f"Weird state: {state}; admonish the developer!")
                     self.updateState(State.PASSIVE)
 
-            self._previous_tid = current_tid
-            if have_written_something:
-                channel.update()
+        self._previous_tid = current_tid
+        if have_written_something:
+            channel.update()
 
     def _update_target(self, offset=0):
         # assumes nextTrainToCatch and numberOfTrainsToCatch etc. have been set
-- 
GitLab