This commit is contained in:
Alex
2019-09-21 11:11:49 +03:00
parent 2d25ce5754
commit f1e019bba5
40 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
void saveEEPROM() {
EEPROM.put(3 * currentMode, modes[currentMode]);
EEPROM.commit();
}
void eepromTick() {
if (settChanged && millis() - eepromTimer > 30000) {
settChanged = false;
eepromTimer = millis();
saveEEPROM();
if (EEPROM.read(101) != currentMode) EEPROM.write(101, currentMode);
EEPROM.commit();
}
}
void saveAlarm(byte almNumber) {
EEPROM.write(5 * almNumber + 50, alarm[almNumber].state); // рассвет
eeWriteInt(5 * almNumber + 50 + 1, alarm[almNumber].time);
EEPROM.commit();
}
void saveDawnMmode() {
EEPROM.write(100, dawnMode); // рассвет
EEPROM.commit();
}