1
0
mirror of https://github.com/skaringa/water-counter.git synced 2024-11-21 17:04:25 +01:00

Ensure that trigger mode is set

This commit is contained in:
Martin Kompf 2019-02-15 18:56:48 +01:00
parent 964011e832
commit 21997a1d85

View File

@ -94,6 +94,9 @@ def main():
if not ser.isOpen(): if not ser.isOpen():
print "Unable to open serial port %s" % port print "Unable to open serial port %s" % port
sys.exit(1) sys.exit(1)
# set trigger mode
ser.write(b'C\r\n')
ser.write(b'T\r\n')
trigger_state = 0 trigger_state = 0
counter = last_rrd_count() counter = last_rrd_count()