Changeset - f1a2d85da29b
[Not reviewed]
cortex-f0
0 1 0
Ethan Zonca - 9 years ago 2015-06-15 21:11:56
ez@ethanzonca.com
Bootloader is now the top menu item, and menu defaults to second item. System resets on flash erase.
1 file changed with 16 insertions and 14 deletions:
display.c
16
14
0 comments (0 inline, 0 general)
display.c
Show inline comments
 
@@ -74,6 +74,11 @@ void display_process(therm_settings_t* s
 
            ssd1306_drawlogo();
 

	
 
            switch(goto_mode) {
 
                case 3:
 
                {
 
                    ssd1306_DrawString("-> loader   ", 1, 40);
 
                } break;
 

	
 
                case 2:
 
                {
 
                    ssd1306_DrawString("-> heat     ", 1, 40);
 
@@ -86,11 +91,6 @@ void display_process(therm_settings_t* s
 

	
 
                case 0:
 
                {
 
                    ssd1306_DrawString("-> loader   ", 1, 40);
 
                } break;
 

	
 
                case 3:
 
                {
 
                    ssd1306_DrawString("-> reset    ", 1, 40);
 
                }
 
            }
 
@@ -99,15 +99,6 @@ void display_process(therm_settings_t* s
 
            if(SW_BTN_PRESSED) {
 
                switch(goto_mode) {
 
                    case 3:
 
                        status->state = STATE_IDLE;
 
                        flash_erase(set);
 
                    case 2:
 
                        status->state = STATE_PREHEAT_BREW;
 
                        break;
 
                    case 1:
 
                        status->state = STATE_SETP;
 
                        break;
 
                    case 0:
 
                    {
 
                        ssd1306_clearscreen();
 
                        ssd1306_DrawString("Bootloader Entered", 0, 0);
 
@@ -116,6 +107,17 @@ void display_process(therm_settings_t* s
 
                        bootloader_enter(); // Resets into bootloader
 
                        status->state = STATE_IDLE; // Just in case
 
                    } break;
 
                    case 2:
 
                        status->state = STATE_PREHEAT_BREW;
 
                        break;
 
                    case 1:
 
                        status->state = STATE_SETP;
 
                        break;
 
                    case 0:
 
                        status->state = STATE_IDLE;
 
                        flash_erase(set);
 
                        NVIC_SystemReset(); 
 
                        break;
 

	
 
                    default:
 
                        status->state = STATE_PREHEAT_BREW;
0 comments (0 inline, 0 general)