diff --git a/display.c b/display.c --- a/display.c +++ b/display.c @@ -35,7 +35,7 @@ static uint8_t sw_right_last = 0; static uint8_t trigger_drawsetpoint = 1; static int16_t last_temp = 21245; static uint8_t goto_mode = MODE_HEAT; -static uint8_t reset_mode = RESET_RESET; +static uint8_t reset_mode = RESET_REBOOT; @@ -109,7 +109,7 @@ void display_process(therm_settings_t* s break; case MODE_RESET: status->state = STATE_RESET; - reset_mode = RESET_RESET; + reset_mode = RESET_REBOOT; break; #ifdef BOOTLOADER_SHORTCUT case MODE_BOOTLOADER: @@ -457,17 +457,21 @@ void display_process(therm_settings_t* s ssd1306_drawlogo(); switch(reset_mode) { - case RESET_RESET: + case RESET_DEFAULTS: { - ssd1306_drawstring("-> reset ", 1, 40); + ssd1306_drawstring("-> defaults ", 1, 40); } break; case RESET_BOOTLOADER: { - ssd1306_drawstring("-> bootloader", 1, 40); + ssd1306_drawstring("-> bootloader ", 1, 40); + } break; + case RESET_REBOOT: + { + ssd1306_drawstring("-> reboot ", 1, 40); } break; case RESET_EXIT: { - ssd1306_drawstring("-> exit ", 1, 40); + ssd1306_drawstring("-> exit ", 1, 40); } break; } @@ -484,13 +488,18 @@ void display_process(therm_settings_t* s bootloader_enter(); // Resets into bootloader status->state = STATE_RESET; // Just in case } break; - case RESET_RESET: + case RESET_DEFAULTS: { status->state = STATE_RESET; flash_load_defaults(set); flash_save(set); NVIC_SystemReset(); } break; + case RESET_REBOOT: + { + status->state = STATE_RESET; + NVIC_SystemReset(); + } break; case RESET_EXIT: { status->state = STATE_IDLE;