power panic: optimise incrementing EEPROM statistics

Change in memory:
Flash: -26 bytes
SRAM: 0 bytes
This commit is contained in:
Guðni Már Gilbert 2023-07-16 14:43:57 +00:00 committed by DRracer
parent 2cd5ab2349
commit 03e7ff1983
1 changed files with 2 additions and 2 deletions

View File

@ -271,8 +271,8 @@ static void uvlo_tiny() {
eeprom_update_byte((uint8_t*)EEPROM_UVLO, PENDING_RECOVERY_RETRY);
// Increment power failure counter
eeprom_update_byte((uint8_t*)EEPROM_POWER_COUNT, eeprom_read_byte((uint8_t*)EEPROM_POWER_COUNT) + 1);
eeprom_update_word((uint16_t*)EEPROM_POWER_COUNT_TOT, eeprom_read_word((uint16_t*)EEPROM_POWER_COUNT_TOT) + 1);
eeprom_increment_byte((uint8_t*)EEPROM_POWER_COUNT);
eeprom_increment_word((uint16_t*)EEPROM_POWER_COUNT_TOT);
printf_P(_N("UVLO_TINY - end %d\n"), _millis() - time_start);
uvlo_drain_reset();