Change PowerCycleTime form 10 to 8 seconds

This commit is contained in:
Theo Arends 2019-10-17 10:30:43 +02:00
parent 99901986a0
commit 60ffc96f15
2 changed files with 5 additions and 1 deletions

View File

@ -110,6 +110,7 @@ const uint8_t MAX_POWER_RETRY = 5; // Retry count allowing agreed power
const uint8_t STATES = 20; // Number of states per second using 50 mSec interval
const uint8_t IMMINENT_RESET_FACTOR = 10; // Factor to extent button hold time for imminent Reset to default 40 seconds using KEY_HOLD_TIME of 40
const uint32_t BOOT_LOOP_TIME = 10; // Number of seconds to stop detecting boot loops
const uint32_t POWER_CYCLE_TIME = 8; // Number of seconds to reset power cycle boot loops
const uint16_t SYSLOG_TIMER = 600; // Seconds to restore syslog_level
const uint16_t SERIALLOG_TIMER = 600; // Seconds to disable SerialLog
const uint8_t OTA_ATTEMPTS = 5; // Number of times to try fetching the new firmware

View File

@ -778,10 +778,13 @@ void PerformEverySecond(void)
ntp_synced_message = false;
}
if (POWER_CYCLE_TIME == uptime) {
UpdateQuickPowerCycle(false);
}
if (BOOT_LOOP_TIME == uptime) {
RtcReboot.fast_reboot_count = 0;
RtcRebootSave();
UpdateQuickPowerCycle(false);
Settings.bootcount++; // Moved to here to stop flash writes during start-up
AddLog_P2(LOG_LEVEL_DEBUG, PSTR(D_LOG_APPLICATION D_BOOT_COUNT " %d"), Settings.bootcount);