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:
parent
6dfebec8c5
commit
1beca6f4da
@ -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++;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user