Changeset - 89a3a8b7b86f
[Not reviewed]
default
0 1 0
Ethan Zonca - 10 years ago 2014-08-23 23:44:29
ez@ethanzonca.com
updated config interface
1 file changed with 4 insertions and 4 deletions:
main.c
4
4
0 comments (0 inline, 0 general)
main.c
Show inline comments
 
@@ -229,54 +229,54 @@ void process()
 
    //if(
 
    GPIO_SetBits(LED_STAT);
 
 
    // Write output to SSR
 
}
 
 
 
 
enum state {
 
    STATE_IDLE = 0,
 
    STATE_SETP,
 
    STATE_SETI,
 
    STATE_SETD,
 
 
    STATE_PREHEAT_BREW,
 
    STATE_MAINTAIN_BREW,
 
    STATE_PREHEAT_STEAM,
 
    STATE_MAINTAIN_STEAM,
 
};
 
 
 
void draw_setpoint() {
 
    char tempstr[3];
 
    itoa_fp(temp, temp_frac, tempstr);
 
    ssd1306_DrawString("    ", 3, 40);
 
    //ssd1306_DrawString("        ", 3, 40);
 
    ssd1306_DrawString(tempstr, 3, 40);
 
    ssd1306_DrawString("-> ", 3, 40);
 
    ssd1306_DrawString("-> ", 3, 80);
 
    itoa(setpoint, tempstr);
 
    ssd1306_DrawString("    ", 3, 70);
 
    ssd1306_DrawString(tempstr, 3, 70);
 
    ssd1306_DrawString("    ", 3, 95);
 
    ssd1306_DrawString(tempstr, 3, 95);
 
}
 
 
 
 
 
 
uint8_t state = STATE_IDLE;
 
uint8_t goto_mode = 2;
 
 
// State machine
 
void machine()
 
{
 
    uint8_t last_state = state;
 
 
    switch(state)
 
    {
 
        // Idle state
 
        case STATE_IDLE:
 
        {
 
            // Write text to OLED
 
            // [ therm :: idle ]
 
            ssd1306_DrawString("therm :: idle ", 0, 40);
 
 
            char tempstr[6];
 
            itoa_fp(temp, temp_frac, tempstr);
0 comments (0 inline, 0 general)