variable size ble transmissions
This commit is contained in:
@@ -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']
|
||||
|
||||
Reference in New Issue
Block a user