FW bidir comms work
This commit is contained in:
parent
424310d957
commit
6ebd1a667d
2 changed files with 20 additions and 14 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue