From 39113a6dedaed52061b9b778a0a3e32d5d1c1530 Mon Sep 17 00:00:00 2001 From: Martijn Date: Wed, 28 Aug 2024 14:44:08 +0200 Subject: [PATCH] #70 Fix greater than signs --- py_driver/driver.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/py_driver/driver.py b/py_driver/driver.py index 1610025..22055a2 100644 --- a/py_driver/driver.py +++ b/py_driver/driver.py @@ -264,14 +264,14 @@ def _underflow_check(self): self.update_state(quick=True) # check underflows - if self.state.Tube1_sonar_dist_mm < TUBE_MAX_LEVEL: + if self.state.Tube1_sonar_dist_mm > TUBE_MAX_LEVEL: # if outflow is active while inflow is stopped, error out if self.state.Tube1_outflow_duty > 0 and self.state.Tube1_inflow_duty == 0: self.set_outflow(1, 0) print( f'{TAG}: WARN: Low water level detected in tube 1: {self.state.Tube1_sonar_dist_mm}. Stopped outflow') - elif self.state.Tube2_sonar_dist_mm < TUBE_MAX_LEVEL: + elif self.state.Tube2_sonar_dist_mm > TUBE_MAX_LEVEL: # if outflow is active while inflow is stopped, error out if self.state.Tube2_outflow_duty > 0 and self.state.Tube2_inflow_duty == 0: self.set_outflow(2, 0)