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");