fix: auto-disconnect reset time

This commit is contained in:
awalol
2026-03-21 13:16:14 +08:00
parent 831b1e9b73
commit 49eba414cb
+1
View File
@@ -321,6 +321,7 @@ static void l2cap_packet_handler(uint8_t packet_type, uint16_t channel, uint8_t
inactive_time = time_us_32(); inactive_time = time_us_32();
}else if (time_us_32() - inactive_time > 600 * 1000 * 1000){ }else if (time_us_32() - inactive_time > 600 * 1000 * 1000){
printf("disconnect when inactive\n"); printf("disconnect when inactive\n");
inactive_time = time_us_32();
bt_disconnect(); bt_disconnect();
} }
} else if (channel == hid_control_cid) { } else if (channel == hid_control_cid) {