From 641b4734fed267762c67c99d7a94d4818a9f62b9 Mon Sep 17 00:00:00 2001 From: GrzegorzWo Date: Wed, 1 Feb 2023 09:27:05 +0100 Subject: [PATCH] Update LowPowerDemo.ino Fix for: CRC checking of data read from RTC was always true in setup() function, due to typo in expression. --- 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 9a6fbc5bfd..5d1fb2fb44 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++; }