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.
This commit is contained in:
Jan Philipp Ecker
2025-08-08 15:39:10 +02:00
parent 0a02912e4a
commit d7ee52ba1f

View File

@@ -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();