1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-06 05:21:22 +03:00

Fix LowPowerDemo.ino (#8841)

CRC checking of data read from RTC was always true
This commit is contained in:
GrzegorzWo 2023-02-01 16:31:20 +01:00 committed by GitHub
parent 6dfebec8c5
commit 1beca6f4da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -128,7 +128,7 @@ void setup() {
// Read previous resets (Deep Sleeps) from RTC memory, if any
uint32_t crcOfData = crc32((uint8_t*)&nv->rtcData.rstCount, sizeof(nv->rtcData.rstCount));
if ((crcOfData = nv->rtcData.crc32) && (resetCause == "Deep-Sleep Wake")) {
if ((crcOfData == nv->rtcData.crc32) && (resetCause == "Deep-Sleep Wake")) {
resetCount = nv->rtcData.rstCount; // read the previous reset count
resetCount++;
}