variable size ble transmissions
This commit is contained in:
@@ -305,8 +305,11 @@ int main(void)
|
||||
|
||||
if (usb_ready and total_tim6() - usb_buff.last_write > 4000) {
|
||||
extern dbl_buff<1024, usb_send> usb_buff;
|
||||
extern dbl_buff<1024, uart_send> ble_buff;
|
||||
usb_buff.send();
|
||||
}
|
||||
|
||||
if (wb1mmc_ready and total_tim6() - ble_buff.last_write > 4000) {
|
||||
extern dbl_buff<1024, uart_send> ble_buff;
|
||||
ble_buff.send();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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