From 3564f8223bdb2c0cf96f33a912b6df3106c78afe Mon Sep 17 00:00:00 2001 From: Torsten Stauder Date: Sat, 31 Jul 2021 21:34:14 +0200 Subject: [PATCH] Fixing wakeup-bug via button when LPCD is enabled --- src/main.cpp | 6 +++++- src/revision.h | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 39a692e..f2cf6ad 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -129,7 +129,11 @@ void printWakeUpReason() { void setup() { Log_Init(); Rfid_Init(); - Rfid_WakeupCheck(); + // Check if wakeup-reason was card-detection (PN5180 only) + esp_sleep_wakeup_cause_t wakeup_reason = esp_sleep_get_wakeup_cause(); + if (wakeup_reason == ESP_SLEEP_WAKEUP_EXT1) { + Rfid_WakeupCheck(); + } System_Init(); memset(&gPlayProperties, 0, sizeof(gPlayProperties)); diff --git a/src/revision.h b/src/revision.h index adc552e..eaf46e8 100644 --- a/src/revision.h +++ b/src/revision.h @@ -1,4 +1,4 @@ #ifndef __REVISION_H__ #define __REVISION_H__ - constexpr const char softwareRevision[] PROGMEM = "Software-revision: 20210728-1"; + constexpr const char softwareRevision[] PROGMEM = "Software-revision: 20210731-1"; #endif \ No newline at end of file