This commit is contained in:
Alex
2019-09-21 11:00:50 +03:00
parent 9e08c4e11e
commit 2d25ce5754
35 changed files with 455663 additions and 0 deletions

View File

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