# HG changeset patch # User Ethan Zonca # Date 2014-09-03 22:37:07 # Node ID bdb054218ca31aadc00f2366e906fd24ddf99dd0 # Parent e81ace60fae33c5e77995cf4ce00ff47ff5372e6 Remove debug output and enable boot to brew functionality diff --git a/main.c b/main.c --- a/main.c +++ b/main.c @@ -45,6 +45,7 @@ enum state { STATE_MAINTAIN_STEAM, }; +uint8_t state = STATE_IDLE; static __IO uint32_t TimingDelay; @@ -93,10 +94,10 @@ int main(void) ssd1306_DrawString("protofusion.org/therm", 3, 0); delay(1500); ssd1306_clearscreen(); + restore_settings(); - delay(1500); - delay(1500); - ssd1306_clearscreen(); + if(boottobrew) + state = STATE_PREHEAT_BREW; // Go to brew instead of idle if configured thusly GPIO_ResetBits(LED_STAT); @@ -277,7 +278,6 @@ void draw_setpoint() { ssd1306_DrawString(tempstr, 3, 95); } -uint8_t state = STATE_IDLE; uint8_t goto_mode = 2; // State machine @@ -320,6 +320,7 @@ void save_settings() } +// TODO: Save/restore temperature setpoint settings void restore_settings() { DATA_EEPROM_Unlock(); @@ -339,12 +340,6 @@ void restore_settings() k_d = (*(__IO uint32_t*)EEPROM_ADDR_K_D); DATA_EEPROM_Lock(); - - char tempstr[6]; - itoa(windup_guard, tempstr); - ssd1306_DrawString("Read: ", 3, 40); - ssd1306_DrawString(" ", 3, 72); - ssd1306_DrawString(tempstr, 3, 72); } void machine()