From ed4f7ac8e6a13e5a909e3fbe80adba40f568b265 Mon Sep 17 00:00:00 2001 From: awalol Date: Sat, 4 Apr 2026 00:44:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=9D=99=E9=BB=98=E6=97=B6?= =?UTF-8?q?=E9=97=B4bug=20=E5=A2=9E=E5=8A=A0=E9=9D=99=E9=BB=98=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E5=88=B030=E5=88=86=E9=92=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 2 +- src/bt.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3861639..1a4abc3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -62,7 +62,7 @@ target_compile_definitions(ds5-bridge PRIVATE ) pico_set_program_name(ds5-bridge "ds5-bridge") -pico_set_program_version(ds5-bridge "0.3") +pico_set_program_version(ds5-bridge "0.3.2") # Modify the below lines to enable/disable output over UART/USB pico_enable_stdio_uart(ds5-bridge 1) diff --git a/src/bt.cpp b/src/bt.cpp index d793049..bb86aea 100644 --- a/src/bt.cpp +++ b/src/bt.cpp @@ -326,7 +326,7 @@ static void l2cap_packet_handler(uint8_t packet_type, uint16_t channel, uint8_t } if (packet[3] < 120 || packet[3] > 140) { inactive_time = time_us_32(); - }else if (time_us_32() - inactive_time > 600 * 1000 * 1000){ + }else if (time_us_32() - inactive_time > 1800 * 1000 * 1000){ printf("disconnect when inactive\n"); inactive_time = time_us_32(); bt_disconnect(); @@ -364,6 +364,7 @@ static void l2cap_packet_handler(uint8_t packet_type, uint16_t channel, uint8_t if (!mute[0]) { cyw43_arch_gpio_put(CYW43_WL_GPIO_LED_PIN, true); } + inactive_time = time_us_32(); printf("Init DualSense\n");