From 49eba414cbeb5324cf28ffc60fd1e6662d5baa3e Mon Sep 17 00:00:00 2001 From: awalol Date: Sat, 21 Mar 2026 13:16:14 +0800 Subject: [PATCH] fix: auto-disconnect reset time --- src/bt.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/bt.cpp b/src/bt.cpp index 38f3355..1c77b61 100644 --- a/src/bt.cpp +++ b/src/bt.cpp @@ -321,6 +321,7 @@ static void l2cap_packet_handler(uint8_t packet_type, uint16_t channel, uint8_t inactive_time = time_us_32(); }else if (time_us_32() - inactive_time > 600 * 1000 * 1000){ printf("disconnect when inactive\n"); + inactive_time = time_us_32(); bt_disconnect(); } } else if (channel == hid_control_cid) {