From a7c99d3f269b75b1d5b24480a91964008d4466c6 Mon Sep 17 00:00:00 2001 From: Jan Philipp Ecker Date: Fri, 8 Aug 2025 15:39:10 +0200 Subject: [PATCH] Improves init - NFC reading now only starts after boot is finished NFC tags that are on the scale during startup will only be read after the boot sequence is finished. --- src/nfc.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/nfc.cpp b/src/nfc.cpp index a95f9ff..83dfb5e 100644 --- a/src/nfc.cpp +++ b/src/nfc.cpp @@ -8,6 +8,7 @@ #include "esp_task_wdt.h" #include "scale.h" #include "bambu.h" +#include "main.h" //Adafruit_PN532 nfc(PN532_SCK, PN532_MISO, PN532_MOSI, PN532_SS); Adafruit_PN532 nfc(PN532_IRQ, PN532_RESET); @@ -406,7 +407,7 @@ void scanRfidTask(void * parameter) { Serial.println("RFID Task gestartet"); for(;;) { // Wenn geschrieben wird Schleife aussetzen - if (nfcReaderState != NFC_WRITING && !nfcReadingTaskSuspendRequest) + if (nfcReaderState != NFC_WRITING && !nfcReadingTaskSuspendRequest && !booting) { nfcReadingTaskSuspendState = false; yield();