From 1beca6f4dab79410f70a345630e02d7ded30093d Mon Sep 17 00:00:00 2001 From: GrzegorzWo Date: Wed, 1 Feb 2023 16:31:20 +0100 Subject: [PATCH] Fix LowPowerDemo.ino (#8841) CRC checking of data read from RTC was always true --- libraries/esp8266/examples/LowPowerDemo/LowPowerDemo.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/esp8266/examples/LowPowerDemo/LowPowerDemo.ino b/libraries/esp8266/examples/LowPowerDemo/LowPowerDemo.ino index 9a6fbc5bf..5d1fb2fb4 100644 --- a/libraries/esp8266/examples/LowPowerDemo/LowPowerDemo.ino +++ b/libraries/esp8266/examples/LowPowerDemo/LowPowerDemo.ino @@ -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++; }