Skip to content

Commit 4adefe0

Browse files
GrzegorzWohasenradball
authored andcommitted
Fix LowPowerDemo.ino (esp8266#8841)
CRC checking of data read from RTC was always true
1 parent 1e26dcb commit 4adefe0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/esp8266/examples/LowPowerDemo/LowPowerDemo.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ void setup() {
128128

129129
// Read previous resets (Deep Sleeps) from RTC memory, if any
130130
uint32_t crcOfData = crc32((uint8_t*)&nv->rtcData.rstCount, sizeof(nv->rtcData.rstCount));
131-
if ((crcOfData = nv->rtcData.crc32) && (resetCause == "Deep-Sleep Wake")) {
131+
if ((crcOfData == nv->rtcData.crc32) && (resetCause == "Deep-Sleep Wake")) {
132132
resetCount = nv->rtcData.rstCount; // read the previous reset count
133133
resetCount++;
134134
}

0 commit comments

Comments
 (0)