diff --git a/apps/misc.c b/apps/misc.c index e10fceb9af..21a45037ad 100644 --- a/apps/misc.c +++ b/apps/misc.c @@ -306,6 +306,12 @@ static bool clean_shutdown(enum shutdown_type sd_type, { long msg_id = -1; + if (!global_settings.show_shutdown_message && get_sleep_timer_active()) + { + talk_force_shutup(); + talk_disable(true); + } + status_save(); #if CONFIG_CHARGING && !defined(HAVE_POWEROFF_WHILE_CHARGING) diff --git a/firmware/export/powermgmt.h b/firmware/export/powermgmt.h index 6ae5ccfd13..41594abe4d 100644 --- a/firmware/export/powermgmt.h +++ b/firmware/export/powermgmt.h @@ -164,6 +164,7 @@ int get_battery_capacity(void); /* get local battery capacity value */ void set_battery_type(int type); /* set local battery type */ void set_sleeptimer_duration(int minutes); +bool get_sleep_timer_active(void); int get_sleep_timer(void); void set_keypress_restarts_sleep_timer(bool enable); void handle_auto_poweroff(void); diff --git a/firmware/powermgmt.c b/firmware/powermgmt.c index c33ad387ae..abcd32f814 100644 --- a/firmware/powermgmt.c +++ b/firmware/powermgmt.c @@ -961,6 +961,11 @@ static void set_sleep_timer(int seconds) sleeptimer_duration = seconds; } +bool get_sleep_timer_active(void) +{ + return sleeptimer_active; +} + int get_sleep_timer(void) { if (sleeptimer_active && (sleeptimer_endtick >= current_tick))