Lines Matching refs:ser
24 def fetch_sentence(ser): argument
25 channel_id = int.from_bytes(ser.read(), "little")
28 msg = ser.read(msg_size)
29 ser.read(1) # skip '*'
33 def pub_start_measurement(ser, action: bool): argument
36 ser.write(b'$')
37 ser.write(b'\x02') # idx
38 ser.write(b'\x01')
39 ser.write(b'*')
40 ser.flush()
43 ser = serial.Serial(args.port) variable
44 pub_start_measurement(ser, True)
46 d = ser.read()
48 channel_name, msg_size, msg = fetch_sentence(ser)
53 pub_start_measurement(ser, True)