From 0e7c2f54c4e10277e97fe5d0497a8a2f3b749821 Mon Sep 17 00:00:00 2001 From: Torsten Stauder Date: Fri, 6 Aug 2021 23:17:12 +0200 Subject: [PATCH] Fixing RC522-init --- src/main.cpp | 7 ++++++- src/revision.h | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index f2cf6ad..163532e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -128,7 +128,9 @@ void printWakeUpReason() { void setup() { Log_Init(); - Rfid_Init(); + #ifdef RFID_READER_TYPE_PN5180 + Rfid_Init(); + #endif // 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) { @@ -217,6 +219,9 @@ void setup() { Mqtt_Init(); Battery_Init(); Button_Init(); + #ifndef RFID_READER_TYPE_PN5180 + Rfid_Init(); + #endif RotaryEncoder_Init(); Wlan_Init(); Bluetooth_Init(); diff --git a/src/revision.h b/src/revision.h index 657675d..8c975ad 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: 20210806-1"; + constexpr const char softwareRevision[] PROGMEM = "Software-revision: 20210806-2"; #endif \ No newline at end of file