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
+4 -1
View File
@@ -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();
}
}
+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']