variable size ble transmissions

This commit is contained in:
ggw
2026-05-08 16:54:36 -05:00
parent 41ec35233d
commit 2b5ade4bec
5 changed files with 24 additions and 13 deletions
+3 -2
View File
@@ -97,10 +97,11 @@ def update_with_data(ser, types):
while (index < size):
packet_type = cons[index]
t = [t for t in types if t['type_code'] == packet_type][0]
#print(index, packet_type, t['type_name'])
print(index, packet_type, t['type_name'])
d = cons[index + 1 : index + 1 + t['size']]
if t['type_name'] == b'packet_imu':
process_imu(d, t)
pass
#process_imu(d, t)
if t['type_name'] == b'packet_msg':
print(d)
index += 1 + t['size']