修复静默时间bug 增加静默时间到30分钟
This commit is contained in:
+1
-1
@@ -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
@@ -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");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user