Reorder eeprom reads

Saves 4B of flash
This commit is contained in:
Alex Voinea 2023-04-13 11:15:17 +02:00
parent f333d36e47
commit af4a3f3328
No known key found for this signature in database
GPG Key ID: 37EDFD565CB33BAD
1 changed files with 1 additions and 1 deletions

View File

@ -1041,11 +1041,11 @@ static void fw_crash_init()
static void fw_kill_init() {
if (eeprom_read_byte((uint8_t*)EEPROM_KILL_PENDING_FLAG) == KILL_PENDING_FLAG) {
PGM_P kill_msg = (PGM_P)eeprom_read_word((uint16_t*)EEPROM_KILL_MESSAGE);
// clear pending message event
eeprom_write_byte((uint8_t*)EEPROM_KILL_PENDING_FLAG, EEPROM_EMPTY_VALUE);
// display the kill message
PGM_P kill_msg = (PGM_P)eeprom_read_word((uint16_t*)EEPROM_KILL_MESSAGE);
lcd_show_fullscreen_message_and_wait_P(kill_msg);
}
}