From fd8f7685a10ce24de126f28cc9e2067a77846bb9 Mon Sep 17 00:00:00 2001 From: Manuel Weiser Date: Thu, 27 Feb 2025 21:54:32 +0100 Subject: [PATCH] =?UTF-8?q?fix:=20optimiere=20Verz=C3=B6gerungen=20und=20S?= =?UTF-8?q?tackgr=C3=B6=C3=9Fen=20in=20NFC-Task-Funktionen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/nfc.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/nfc.cpp b/src/nfc.cpp index c7625c2..3da8398 100644 --- a/src/nfc.cpp +++ b/src/nfc.cpp @@ -238,12 +238,14 @@ void writeJsonToTag(void *parameter) { hasReadRfidTag = 3; vTaskSuspend(RfidReaderTask); - vTaskDelay(500 / portTICK_PERIOD_MS); + vTaskDelay(50 / portTICK_PERIOD_MS); + //pauseBambuMqttTask = true; // aktualisieren der Website wenn sich der Status ändert sendNfcData(nullptr); + vTaskDelay(100 / portTICK_PERIOD_MS); oledShowMessage("Waiting for NFC-Tag"); - + // Wait 10sec for tag uint8_t success = 0; String uidString = ""; @@ -331,7 +333,7 @@ void startWriteJsonToTag(const char* payload) { xTaskCreate( writeJsonToTag, // Task-Funktion "WriteJsonToTagTask", // Task-Name - 4096, // Stackgröße in Bytes + 5115, // Stackgröße in Bytes (void*)payloadCopy, // Parameter rfidWriteTaskPrio, // Priorität NULL // Task-Handle (nicht benötigt) @@ -456,7 +458,7 @@ void startNfc() { BaseType_t result = xTaskCreatePinnedToCore( scanRfidTask, /* Function to implement the task */ "RfidReader", /* Name of the task */ - 10000, /* Stack size in words */ + 5115, /* Stack size in words */ NULL, /* Task input parameter */ rfidTaskPrio, /* Priority of the task */ &RfidReaderTask, /* Task handle. */