diff options
Diffstat (limited to 'apps')
| -rw-r--r-- | apps/main.c | 2 | ||||
| -rw-r--r-- | apps/screens.c | 24 |
2 files changed, 6 insertions, 20 deletions
diff --git a/apps/main.c b/apps/main.c index 66e046a..4dee444 100644 --- a/apps/main.c +++ b/apps/main.c @@ -198,7 +198,7 @@ void init(void) ) { rc = charging_screen(); /* display a "charging" screen */ - if (rc == 1 || rc == 2) /* charger removed or "Off/Stop" pressed */ + if (rc == 1) /* charger removed */ power_off(); /* "On" pressed or USB connected: proceed */ show_logo(); /* again, to provide better visual feedback */ diff --git a/apps/screens.c b/apps/screens.c index 0ff88c6..badbdb7 100644 --- a/apps/screens.c +++ b/apps/screens.c @@ -339,11 +339,6 @@ int charging_screen(void) { unsigned int button; int rc = 0; -#ifdef BUTTON_OFF - const unsigned int offbutton = BUTTON_OFF; -#else - const unsigned int offbutton = BUTTON_STOP; -#endif ide_power_enable(false); /* power down the disk, else would be spinning */ @@ -365,21 +360,12 @@ int charging_screen(void) status_draw(false); charging_display_info(true); button = button_get_w_tmo(HZ/3); -#ifdef BUTTON_ON - if (button == (BUTTON_ON | BUTTON_REL)) -#else - if (button == (BUTTON_RIGHT | BUTTON_REL)) -#endif - rc = 3; - else if (button == offbutton) + if (button == BUTTON_ON) rc = 2; - else - { - if (usb_detect()) - rc = 4; - else if (!charger_inserted()) - rc = 1; - } + else if (usb_detect()) + rc = 3; + else if (!charger_inserted()) + rc = 1; } while (!rc); #ifdef HAVE_LCD_CHARCELLS |