This commit is contained in:
Max 2021-09-22 14:11:03 +01:00
parent 8126756e78
commit 7c6088bcc8

View File

@ -24,6 +24,7 @@ class Proximity:
self.ser = serial.Serial(self.serial_string, 9600, timeout=1) self.ser = serial.Serial(self.serial_string, 9600, timeout=1)
self.alive = True self.alive = True
self.log.info('Proximity serial open') self.log.info('Proximity serial open')
self.ser.flushInput()
except Exception as e: except Exception as e:
self.log.critical(f"Cannot open serial device, {e}") self.log.critical(f"Cannot open serial device, {e}")
self.log.critical('Exiting') self.log.critical('Exiting')