Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8f4c67eb46 | ||
|
|
cb3d3952b0 | ||
|
|
3662422c1c |
No files matched your search
+1
-1
@@ -9,7 +9,7 @@
|
||||
; https://docs.platformio.org/page/projectconf.html
|
||||
|
||||
[common]
|
||||
version = "3.4.9"
|
||||
version = "3.4.10"
|
||||
to_old_version = "3.4.0"
|
||||
|
||||
[env:esp32dev]
|
||||
|
||||
+37
-37
@@ -234,51 +234,51 @@ void loop() {
|
||||
weightSend = 0;
|
||||
}
|
||||
|
||||
lastWeight = weight;
|
||||
lastWeight = weight;
|
||||
|
||||
// Wenn ein Tag erkannt wurde und das Gewicht stabil ist (4+ seconds), an FilaMan senden
|
||||
if (!scanRequestActive && weightCounterToApi > 3 && weightSend == 0 && nfcReaderState == NFC_READ_SUCCESS && tagProcessed == false)
|
||||
{
|
||||
tagProcessed = true;
|
||||
// Wenn ein Tag erkannt wurde und das Gewicht stabil ist (4+ seconds), an FilaMan senden
|
||||
if (!scanRequestActive && weightCounterToApi > 3 && weightSend == 0 && nfcReaderState == NFC_READ_SUCCESS && tagProcessed == false)
|
||||
{
|
||||
tagProcessed = true;
|
||||
|
||||
// Check if it's a Bambu tag - if so, send only UUID without spoolId
|
||||
if (isBambuTag) {
|
||||
sendWeightAsync(0, activeTagUuid, weight);
|
||||
Serial.println("Bambu weight queued for FilaMan (UUID only)");
|
||||
} else {
|
||||
// Normal NTAG: send spoolId + UUID
|
||||
int sId = activeSpoolId.toInt();
|
||||
sendWeightAsync(sId, activeTagUuid, weight);
|
||||
Serial.println("Weight queued for FilaMan");
|
||||
}
|
||||
weightSend = 1;
|
||||
|
||||
// Feedback to user
|
||||
oledShowProgressBar(3, 4, tr(STR_SPOOL_TAG), tr(STR_SENDING));
|
||||
oledSetPriority(DISPLAY_PRIORITY_ACTION, 2000);
|
||||
}
|
||||
|
||||
// Handle successful tag write
|
||||
if (!scanRequestActive && nfcReaderState == NFC_WRITE_SUCCESS && tagProcessed == false)
|
||||
{
|
||||
tagProcessed = true;
|
||||
|
||||
// Only send weight if a valid spoolId exists (spool tag, not location tag)
|
||||
if (activeSpoolId.length() > 0 && activeSpoolId != "0") {
|
||||
int sId = activeSpoolId.toInt();
|
||||
sendWeightAsync(sId, activeTagUuid, weight);
|
||||
// Check if it's a Bambu tag - if so, send only UUID without spoolId
|
||||
if (isBambuTag) {
|
||||
sendWeightAsync(0, activeTagUuid, weight);
|
||||
Serial.println("Bambu weight queued for FilaMan (UUID only)");
|
||||
} else {
|
||||
// Normal NTAG: send spoolId + UUID
|
||||
int sId = activeSpoolId.toInt();
|
||||
sendWeightAsync(sId, activeTagUuid, weight);
|
||||
Serial.println("Weight queued for FilaMan");
|
||||
}
|
||||
weightSend = 1;
|
||||
Serial.println("Weight queued for FilaMan after spool tag write");
|
||||
|
||||
// Feedback to user
|
||||
oledShowProgressBar(3, 4, tr(STR_TAG_WRITTEN), tr(STR_SENDING));
|
||||
oledShowProgressBar(3, 4, tr(STR_SPOOL_TAG), tr(STR_SENDING));
|
||||
oledSetPriority(DISPLAY_PRIORITY_ACTION, 2000);
|
||||
} else {
|
||||
// Location tag written - no weight to send
|
||||
Serial.println("Location tag written successfully - no weight send needed");
|
||||
}
|
||||
|
||||
// Handle successful tag write
|
||||
if (!scanRequestActive && nfcReaderState == NFC_WRITE_SUCCESS && tagProcessed == false)
|
||||
{
|
||||
tagProcessed = true;
|
||||
|
||||
// Only send weight if a valid spoolId exists (spool tag, not location tag)
|
||||
if (activeSpoolId.length() > 0 && activeSpoolId != "0") {
|
||||
int sId = activeSpoolId.toInt();
|
||||
sendWeightAsync(sId, activeTagUuid, weight);
|
||||
weightSend = 1;
|
||||
Serial.println("Weight queued for FilaMan after spool tag write");
|
||||
|
||||
// Feedback to user
|
||||
oledShowProgressBar(3, 4, tr(STR_TAG_WRITTEN), tr(STR_SENDING));
|
||||
oledSetPriority(DISPLAY_PRIORITY_ACTION, 2000);
|
||||
} else {
|
||||
// Location tag written - no weight to send
|
||||
Serial.println("Location tag written successfully - no weight send needed");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
esp_task_wdt_reset();
|
||||
}
|
||||
Reference in new issue
Block a user