Implemented default values in setup:
EEPROM_readAnything(0, cfg); //read values from eeprom
if (cfg.thermoC_d > 50.0 && cfg.thermoC_d < 20.0){ // check for proper in range values,
cfg.thermoC_d = 27.5; // correct if needed
}
if (cfg.thermoC_n > 50.0 && cfg.thermoC_n < 10.0){
cfg.thermoC_n = 22.5;
}
if (cfg.bgn_night > 23){
cfg.bgn_night = 23;
}
if (cfg.end_night > 23){
cfg.end_night = 7;
}
Also got some weird behavior of variables in the structure.
I first had the floats first in the struct but for some reason I couldn't change the thermostat temps in my menu.
Moved the floats to the end of the struct and everything works fine... :-?