From 045e45074454062ea493b27fe4449ee73485c728 Mon Sep 17 00:00:00 2001 From: Manuel Weiser Date: Mon, 9 Mar 2026 17:06:06 +0100 Subject: [PATCH] feat: add feedback display and clear lastSpoolId after setting location --- src/nfc.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/nfc.cpp b/src/nfc.cpp index 9993889..adf1f52 100644 --- a/src/nfc.cpp +++ b/src/nfc.cpp @@ -1328,6 +1328,18 @@ bool decodeNdefAndReturnJson(const byte* encodedMessage, String uidString) { int locId = doc["location_id"].as(); int sId = lastSpoolId.toInt(); sendLocationAsync(sId, "", locId, ""); + + // Display feedback - location was set + oledShowProgressBar(1, 1, "Location", "Standort gesetzt"); + oledSetPriority(DISPLAY_PRIORITY_ACTION, 3000); + + // Clear lastSpoolId to prevent accidental re-assignment + lastSpoolId = ""; + + // Mark as processed so main.cpp doesn't try to send weight + tagProcessed = true; + activeSpoolId = ""; + Serial.println("Location set - lastSpoolId cleared to prevent re-assignment"); } else {