FW bidir comms work

This commit is contained in:
jaseg 2020-11-27 14:42:52 +01:00
parent 424310d957
commit 6ebd1a667d
2 changed files with 20 additions and 14 deletions

View file

@ -66,8 +66,10 @@ if __name__ == '__main__':
if time.time() - last_tx > 0.01:
seq = int((time.time() - start_time) * 10)
data = struct.pack('<I', seq)
seq += 1
#seq += 1
#ser.write(bytes(list(range(255, -1, -1))))
ser.write(cobs.encode(data + struct.pack('<I', zlib.crc32(data))) + b'\0')
last_tx = time.time()
#time.sleep(0.01)