summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
Diffstat (limited to 'firmware')
-rw-r--r--firmware/drivers/button.c4
-rw-r--r--firmware/powermgmt.c4
2 files changed, 0 insertions, 8 deletions
diff --git a/firmware/drivers/button.c b/firmware/drivers/button.c
index f116ad646e..91b8ebd0c3 100644
--- a/firmware/drivers/button.c
+++ b/firmware/drivers/button.c
@@ -205,12 +205,8 @@ static void button_tick(void)
205#endif 205#endif
206 ) && 206 ) &&
207#if CONFIG_CHARGING && !defined(HAVE_POWEROFF_WHILE_CHARGING) 207#if CONFIG_CHARGING && !defined(HAVE_POWEROFF_WHILE_CHARGING)
208#if CONFIG_CHARGING >= CHARGING_MONITOR
209 !charging_state() &&
210#else
211 !charger_inserted() && 208 !charger_inserted() &&
212#endif 209#endif
213#endif
214 repeat_count > POWEROFF_COUNT) 210 repeat_count > POWEROFF_COUNT)
215 { 211 {
216 /* Tell the main thread that it's time to 212 /* Tell the main thread that it's time to
diff --git a/firmware/powermgmt.c b/firmware/powermgmt.c
index bf5734c264..f1dd83ef52 100644
--- a/firmware/powermgmt.c
+++ b/firmware/powermgmt.c
@@ -358,12 +358,8 @@ static void handle_auto_poweroff(void)
358 358
359 if (usb_inserted() 359 if (usb_inserted()
360#if CONFIG_CHARGING && !defined(HAVE_POWEROFF_WHILE_CHARGING) 360#if CONFIG_CHARGING && !defined(HAVE_POWEROFF_WHILE_CHARGING)
361#if CONFIG_CHARGING >= CHARGING_MONITOR
362 || charging_state()
363#else
364 || charger_input_state != NO_CHARGER 361 || charger_input_state != NO_CHARGER
365#endif 362#endif
366#endif
367 ) { 363 ) {
368 DEBUGF("Sleep timer timeout. Stopping...\n"); 364 DEBUGF("Sleep timer timeout. Stopping...\n");
369 set_sleep_timer(0); 365 set_sleep_timer(0);