fix: reduce delay times for API tasks and NFC scanning to improve responsiveness

This commit is contained in:
Manuel Weiser committed 2026-02-21 20:33:43 +01:00
1 parent 5f9ad13ea9
commit 01b8ced7e9
3 files changed
+6 -7

No files matched your search

+1 -1
View File
@@ -211,7 +211,7 @@ void filamanApiTask(void* pvParameters) {
}
filamanApiState = API_IDLE;
}
vTaskDelay(pdMS_TO_TICKS(1000));
vTaskDelay(pdMS_TO_TICKS(100));
}
}
+1 -1
View File
@@ -212,7 +212,7 @@ void loop() {
lastWeight = weight;
// Wenn ein Tag erkannt wurde und das Gewicht stabil ist, an FilaMan senden
if (weightCounterToApi > 3 && weightSend == 0 && nfcReaderState == NFC_READ_SUCCESS && tagProcessed == false)
if (weightCounterToApi > 1 && weightSend == 0 && nfcReaderState == NFC_READ_SUCCESS && tagProcessed == false)
{
tagProcessed = true;
+4 -5
View File
@@ -2099,13 +2099,12 @@ void scanRfidTask(void * parameter) {
// Add a pause after successful reading to prevent immediate re-reading
if (nfcReaderState == NFC_READ_SUCCESS) {
Serial.println("Tag erfolgreich gelesen - warte 3 Sekunden vor nächstem Scan");
vTaskDelay(pdMS_TO_TICKS(3000));
// Reduced from 5 seconds to 3 seconds
// After tag is processed, slow down scanning to give API time
Serial.println("Tag processed - slowing scan to 2 seconds");
vTaskDelay(pdMS_TO_TICKS(2000));
} else {
// Faster scanning when no tag or idle state
vTaskDelay(pdMS_TO_TICKS(250));
// Faster scan interval
vTaskDelay(pdMS_TO_TICKS(500));
}
// aktualisieren der Website wenn sich der Status ändert