From 7c650a3710b0c7a1ba35eb37d40a8ca20aac7a7f Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Tue, 13 May 2025 14:14:01 +0200 Subject: [PATCH] button.py: shorter long press duration for bootloader mode --- internal_filesystem/builtin/system/button.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal_filesystem/builtin/system/button.py b/internal_filesystem/builtin/system/button.py index f65963a1..01f0feff 100644 --- a/internal_filesystem/builtin/system/button.py +++ b/internal_filesystem/builtin/system/button.py @@ -8,7 +8,7 @@ import _thread button = Pin(0, Pin.IN, Pin.PULL_UP) # Variables for long press detection -long_press_duration = 4000 +long_press_duration = 3000 press_start_time = 0 is_pressed = False @@ -30,6 +30,7 @@ def handle_long_press(): machine.bootloader() def on_long_press(t): # Callback for when long press duration is reached. + print("button.py: long press detected") global timer timer.deinit() # Stop the timer global is_pressed