v0.6.450
This commit is contained in:
@@ -7,6 +7,9 @@ Config config;
|
||||
|
||||
void Config::init() {
|
||||
EEPROM.begin(EEPROM_SIZE);
|
||||
#if IR_PIN!=255
|
||||
irindex=-1;
|
||||
#endif
|
||||
eepromRead(EEPROM_START, store);
|
||||
if (store.tz_set != 57) { // update to v0.4.200
|
||||
store.tz_set = 57;
|
||||
@@ -26,6 +29,13 @@ void Config::init() {
|
||||
save();
|
||||
}
|
||||
loadStation(store.lastStation);
|
||||
#if IR_PIN!=255
|
||||
eepromRead(EEPROM_START_IR, ircodes);
|
||||
if(ircodes.ir_set!=4224){
|
||||
ircodes.ir_set=4224;
|
||||
memset(ircodes.irVals, 0, sizeof(ircodes.irVals));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class T> int Config::eepromWrite(int ee, const T& value) {
|
||||
@@ -82,6 +92,12 @@ void Config::save() {
|
||||
eepromWrite(EEPROM_START, store);
|
||||
}
|
||||
|
||||
#if IR_PIN!=255
|
||||
void Config::saveIR(){
|
||||
eepromWrite(EEPROM_START_IR, ircodes);
|
||||
}
|
||||
#endif
|
||||
|
||||
byte Config::setVolume(byte val, bool dosave) {
|
||||
store.volume = val;
|
||||
if (dosave) {
|
||||
|
||||
Reference in New Issue
Block a user