From f18f761234e84460bdc759c01a644c8401f1f18f Mon Sep 17 00:00:00 2001 From: Pol Henarejos Date: Wed, 19 Mar 2025 01:19:17 +0100 Subject: [PATCH] Restore led mode when finishing button press. Signed-off-by: Pol Henarejos --- src/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index 4d7c068..4df4647 100644 --- a/src/main.c +++ b/src/main.c @@ -191,6 +191,7 @@ bool wait_button() { uint32_t start_button = board_millis(); bool timeout = false; cancel_button = false; + uint32_t led_mode = led_get_mode(); led_set_mode(MODE_BUTTON); req_button_pending = true; while (picok_board_button_read() == false && cancel_button == false) { @@ -211,7 +212,7 @@ bool wait_button() { } } } - led_set_mode(MODE_PROCESSING); + led_set_mode(led_mode); req_button_pending = false; return timeout || cancel_button; }