Skip to content
Snippets Groups Projects
Commit 504021b1 authored by David Hammer's avatar David Hammer
Browse files

Only update rates etc when processing

parent d1df365e
No related branches found
No related tags found
1 merge request!12Snapshot: field test deployed version as of end of run 202201
......@@ -1018,10 +1018,12 @@ class BaseCorrection(PythonDevice):
)
# trainId in _buffered_status_update should be updated in input handler
self.set(self._buffered_status_update)
if default_timer() - self._last_processing_started > PROCESSING_STATE_TIMEOUT:
if self.get("state") is State.PROCESSING:
if self.get("state") is State.PROCESSING:
self.set(self._buffered_status_update)
if (
default_timer() - self._last_processing_started
> PROCESSING_STATE_TIMEOUT
):
self.updateState(State.ON)
self.log_status_info(
f"No new train in {PROCESSING_STATE_TIMEOUT} s, switching state."
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment