修复静默时间bug 增加静默时间到30分钟

This commit is contained in:
awalol
2026-04-04 00:44:35 +08:00
parent 4ee1aa0b64
commit ed4f7ac8e6
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -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)
+2 -1
View File
@@ -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");