diff --git a/boil_kettle/boil_kettle.ino b/boil_kettle/boil_kettle.ino index b26ea8b..0d39800 100644 --- a/boil_kettle/boil_kettle.ino +++ b/boil_kettle/boil_kettle.ino @@ -14,7 +14,6 @@ // My Includes #include "config.h" -#include "eeprom_init.h" #include "button.h" #include "slowPWM.h" @@ -74,7 +73,6 @@ LiquidScreen home_screen(KettleState_line, kettle_power_line); LiquidMenu menu(lcd); void setup() { - StoreEEPROM(); unsigned long lastRun = millis() - UpdateInterval; Serial.begin(9600); diff --git a/boil_kettle/eeprom_init.h b/eeprom_setup/eeprom_init.h similarity index 70% rename from boil_kettle/eeprom_init.h rename to eeprom_setup/eeprom_init.h index 75b09e5..a699228 100644 --- a/boil_kettle/eeprom_init.h +++ b/eeprom_setup/eeprom_init.h @@ -1,40 +1,8 @@ #include - -const uint8_t CompileTimeP[] PROGMEM = __DATE__ " " __TIME__; -const size_t ConfAddress = sizeof(CompileTimeP); - -unsigned char b, e = -1, *p = (uint8_t*)CompileTimeP - 1; - -struct Vessel { - char name[16]; - char setpoint[20]; - char sensor[20]; - double Rref; - double RNominal; -}; - -struct Topic { - char root[10]; - Vessel mash; - Vessel boil; -}; - -struct Mqtt { - IPAddress broker; - char user[10]; - char password[21]; - Topic topic; -}; - -struct ConfigData { - Mqtt mqtt; - int interval; - int period; - uint8_t threshold; - uint8_t hysteresis; -}; +#include "config.h" void StoreEEPROM() { + unsigned char b, e = -1, *p = (uint8_t*)CompileTimeP - 1; while( b = pgm_read_byte( ++p ) ){ if( b != EEPROM[++e] ){