diff --git a/Control/Pi/proximity_detector.py b/Control/Pi/proximity_detector.py index 2d3b02c..fc4365f 100644 --- a/Control/Pi/proximity_detector.py +++ b/Control/Pi/proximity_detector.py @@ -24,6 +24,7 @@ class Proximity: self.ser = serial.Serial(self.serial_string, 9600, timeout=1) self.alive = True self.log.info('Proximity serial open') + self.ser.flushInput() except Exception as e: self.log.critical(f"Cannot open serial device, {e}") self.log.critical('Exiting')