Changeset - e4fd36b0ba55
[Not reviewed]
cortex-f0
0 1 0
Ethan Zonca - 9 years ago 2015-06-05 21:12:37
ez@ethanzonca.com
Make error screen prettier
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
display.c
Show inline comments
 
@@ -468,51 +468,51 @@ void display_process(therm_settings_t* s
 
	    status->setpoint = set->setpoint_steam;
 

	
 
            // Button handler
 
            if(SW_BTN_PRESSED) {
 
                status->state = STATE_IDLE;
 
		save_setpoints(&set); // TODO: Check for mod
 
            }
 
            else {
 
                user_input(&set->setpoint_steam);
 
            }
 

	
 
            // Event Handler
 
            // N/A
 
 
 
        } break;
 

	
 
        case STATE_TC_ERROR:
 
        {
 
            // Write text to OLED
 
            // [ therm : ready to steam ]
 
            // [ 30 => 120 C            ]
 
            ssd1306_DrawString("Error:", 0, 0);
 

	
 
            if(status->tc_errno == 1)
 
                ssd1306_DrawString("#1, Check Sensor", 1, 0);
 
                ssd1306_DrawString("    Check Sensor (1)", 1, 0);
 
            else if(status->tc_errno == 4)
 
                ssd1306_DrawString("#4, Check Sensor", 1, 0);
 
                ssd1306_DrawString("    Check Sensor (2)", 1, 0);
 
            else
 
                ssd1306_DrawString("#?, Unknown Error", 1, 0);
 
            ssd1306_DrawString("                    ", 2, 0);
 

	
 
            ssd1306_DrawString("Press -> to ignore", 3, 0);
 

	
 
            // Button handler
 
            if(SW_BTN_PRESSED) {
 
                status->state = STATE_IDLE;
 
            }
 
            else if(SW_RIGHT_PRESSED) {
 
                set->ignore_tc_error = 1;
 
                status->state = STATE_IDLE;
 
            }
 
            // Event Handler
 
            // Maybe handle if TC is plugged in
 
            // N/A
 
 
 
        } break;
 

	
 
        // Something is terribly wrong
 
        default:
 
        {
 
            status->state = STATE_IDLE;
0 comments (0 inline, 0 general)