Skip to content

Commit 7c650a3

Browse files
button.py: shorter long press duration for bootloader mode
1 parent e53b501 commit 7c650a3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

internal_filesystem/builtin/system/button.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
button = Pin(0, Pin.IN, Pin.PULL_UP)
99

1010
# Variables for long press detection
11-
long_press_duration = 4000
11+
long_press_duration = 3000
1212
press_start_time = 0
1313
is_pressed = False
1414

@@ -30,6 +30,7 @@ def handle_long_press():
3030
machine.bootloader()
3131

3232
def on_long_press(t): # Callback for when long press duration is reached.
33+
print("button.py: long press detected")
3334
global timer
3435
timer.deinit() # Stop the timer
3536
global is_pressed

0 commit comments

Comments
 (0)