File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -424,9 +424,15 @@ int sys_user_shutdown(void)
424424{
425425 int64_t start_time = k_uptime_get ();
426426 bool use_shutdown = CONFIG_0_SETTINGS_READ (CONFIG_0_USER_SHUTDOWN );
427- set_led (SYS_LED_PATTERN_LONG , SYS_LED_PRIORITY_HIGHEST );
427+ set_led (SYS_LED_PATTERN_OFF_FORCE , SYS_LED_PRIORITY_HIGHEST );
428+ bool led_on = false;
428429 while (button_read ()) // If alternate button is available and still pressed, wait for the user to stop pressing the button
429430 {
431+ if (!led_on && k_uptime_get () - start_time > 500 ) // long pattern starts with led on, so delay pattern a bit
432+ {
433+ set_led (SYS_LED_PATTERN_LONG , SYS_LED_PRIORITY_HIGHEST );
434+ led_on = 1 ;
435+ }
430436 if (k_uptime_get () - start_time > 4000 ) // held for over 5 seconds, cancel shutdown
431437 {
432438 set_led (SYS_LED_PATTERN_OFF , SYS_LED_PRIORITY_HIGHEST );
You can’t perform that action at this time.
0 commit comments