Changeset - a5edaa5d3c45
[Not reviewed]
cortex-f0
0 1 0
Ethan Zonca - 8 years ago 2016-04-23 22:24:38
ez@ethanzonca.com
Fixed preheating message with cooler plant
1 file changed with 4 insertions and 0 deletions:
0 comments (0 inline, 0 general)
display.c
Show inline comments
 
@@ -400,49 +400,53 @@ void display_process(therm_settings_t* s
 
            ssd1306_drawstring(tempstr, 1, 57);
 

	
 
            ssd1306_drawstring("Press to accept", 3, 40);
 

	
 
            // Button handler
 
            if(SW_BTN_PRESSED) {
 
                flash_save(set);
 
                status->state = STATE_IDLE;
 
            }
 
            else {
 
                user_input_signed(&set->val.temp_offset);
 
            }
 

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

	
 

	
 
        case STATE_PREHEAT:
 
        {
 
            // Write text to OLED
 
            // [ therm : preheating brew ]
 
            // [ 30 => 120 C             ]
 
            if(set->val.plant_type == PLANT_HEATER)
 
            ssd1306_drawstring("Preheating...", 0, 0);
 
            else
 
                ssd1306_drawstring("Precooling...", 0, 0);
 

	
 
            //ssd1306_drawlogo();
 
            draw_setpoint(status);
 

	
 
            status->pid_enabled = 1;
 
            status->setpoint = set->val.setpoint_brew;
 

	
 
            // Button handler
 
            if(SW_BTN_PRESSED) {
 
                status->state = STATE_IDLE;
 
            }
 
            else {
 
                user_input((uint16_t*)&set->val.setpoint_brew);
 
            }
 

	
 
            // Event Handler
 
            if(status->temp >= status->setpoint) {
 
                status->state = STATE_MAINTAIN;
 
            }
 
 
 
        } break;
 

	
 
        case STATE_MAINTAIN:
 
        {
 
            // Write text to OLED
0 comments (0 inline, 0 general)