Increase deepsleep time
This commit is contained in:
parent
3764183944
commit
ff081a8d44
@ -204,7 +204,7 @@ void espDeepSleep(bool afterPump = false)
|
||||
|
||||
esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_PERIPH, ESP_PD_OPTION_ON);
|
||||
|
||||
long secondsToSleep = -1;
|
||||
unsigned long secondsToSleep = -1;
|
||||
|
||||
if (afterPump)
|
||||
{
|
||||
@ -215,7 +215,6 @@ void espDeepSleep(bool afterPump = false)
|
||||
{
|
||||
if (mBatteryVoltage < VOLT_MIN_BATT)
|
||||
{
|
||||
log(LOG_LEVEL_INFO, String(String(mBatteryVoltage) + "V! Almost empty -> deepSleepNight " + String(LOWVOLT_SLEEP_FACTOR)) + " times", LOG_SLEEP_LOWVOLTAGE);
|
||||
/* use the largest sleeping duration */
|
||||
if (deepSleepNightTime.get() > deepSleepTime.get()) {
|
||||
secondsToSleep = (deepSleepNightTime.get() * LOWVOLT_SLEEP_FACTOR);
|
||||
@ -226,6 +225,7 @@ void espDeepSleep(bool afterPump = false)
|
||||
if (secondsToSleep < LOWVOLT_SLEEP_MINIMUM) {
|
||||
secondsToSleep = LOWVOLT_SLEEP_MINIMUM;
|
||||
}
|
||||
log(LOG_LEVEL_INFO, String(String(mBatteryVoltage) + "V! Almost empty -> deepSleepNight " + String(LOWVOLT_SLEEP_FACTOR)) + " times (" + secondsToSleep + "s)", LOG_SLEEP_LOWVOLTAGE);
|
||||
}
|
||||
else if (mSolarVoltage < SOLAR_CHARGE_MIN_VOLTAGE)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user