Only trigger a quick reset if there's a pending saved state

Thanks to @leptun
This commit is contained in:
Yuri D'Elia 2020-01-29 17:56:26 +01:00
parent b46dc59fad
commit 2b46fdac2d

View File

@ -10772,7 +10772,7 @@ void setup_uvlo_interrupt() {
EIMSK |= (1 << 4); EIMSK |= (1 << 4);
// check if power was lost before we armed the interrupt // check if power was lost before we armed the interrupt
if(!(PINE & (1 << 4))) if(!(PINE & (1 << 4)) && eeprom_read_byte((uint8_t*)EEPROM_UVLO))
{ {
SERIAL_ECHOLNPGM("INT4"); SERIAL_ECHOLNPGM("INT4");
uvlo_drain_reset(); uvlo_drain_reset();