Skip to content

Commit

Permalink
Fix additional hour in counter
Browse files Browse the repository at this point in the history
  • Loading branch information
Bene Dániel committed May 4, 2020
1 parent 0085f33 commit 7c28dcc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ESPPowerManager/ESPPowerManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ void ESPPowerManager::beginEDSMode(uint16_t checksumNumber, uint16_t sleepHours)
extendedDSData.cycleCounter += 1;

if (extendedDSData.cycleCounter > sleepHours) {
extendedDSData.cycleCounter = 0;
extendedDSData.cycleCounter = 1;
ESP.rtcUserMemoryWrite(DS_CYCLE_MEMORY_OFFSET, (uint32_t*)&extendedDSData, sizeof(extendedDSData));
return; // reached specified sleep count, let the jobs run
}
Expand Down

0 comments on commit 7c28dcc

Please sign in to comment.