Compare commits

...

3 Commits
v1.5.1 ... main

2 changed files with 7 additions and 6 deletions

View File

@ -166,7 +166,7 @@ bool updateSpoolTagId(String uidString, const char* payload) {
BaseType_t result = xTaskCreate(
sendToApi, // Task-Funktion
"SendToApiTask", // Task-Name
4096, // Stackgröße in Bytes
6144, // Stackgröße in Bytes
(void*)params, // Parameter
0, // Priorität
NULL // Task-Handle (nicht benötigt)
@ -204,7 +204,7 @@ uint8_t updateSpoolWeight(String spoolId, uint16_t weight) {
BaseType_t result = xTaskCreate(
sendToApi, // Task-Funktion
"SendToApiTask", // Task-Name
4096, // Stackgröße in Bytes
6144, // Stackgröße in Bytes
(void*)params, // Parameter
0, // Priorität
NULL // Task-Handle (nicht benötigt)
@ -243,7 +243,7 @@ bool updateSpoolOcto(int spoolId) {
BaseType_t result = xTaskCreate(
sendToApi, // Task-Funktion
"SendToApiTask", // Task-Name
4096, // Stackgröße in Bytes
6144, // Stackgröße in Bytes
(void*)params, // Parameter
0, // Priorität
NULL // Task-Handle (nicht benötigt)
@ -291,7 +291,7 @@ bool updateSpoolBambuData(String payload) {
BaseType_t result = xTaskCreate(
sendToApi, // Task-Funktion
"SendToApiTask", // Task-Name
4096, // Stackgröße in Bytes
6144, // Stackgröße in Bytes
(void*)params, // Parameter
0, // Priorität
NULL // Task-Handle (nicht benötigt)

View File

@ -180,7 +180,8 @@ void loop() {
lastWeightReadTime = currentMillis;
// Prüfen ob die Waage korrekt genullt ist
if (autoTare && (weight > 0 && weight < 5) || weight < 0)
// Abweichung von 2g ignorieren
if (autoTare && (weight > 2 && weight < 7) || weight < -2)
{
scale_tare_counter++;
}
@ -190,7 +191,7 @@ void loop() {
}
// Prüfen ob das Gewicht gleich bleibt und dann senden
if (weight == lastWeight && weight > 5)
if (abs(weight - lastWeight) <= 2 && weight > 5)
{
weigthCouterToApi++;
}