From 87288e606b0632c66260921a8cc540d4f01efa8e Mon Sep 17 00:00:00 2001 From: Manuel Weiser Date: Mon, 1 Sep 2025 13:33:12 +0200 Subject: [PATCH] refactor: remove redundant tare calls in setup and start_scale functions --- src/main.cpp | 1 - src/scale.cpp | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index ac4b6af..0864f16 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -59,7 +59,6 @@ void setup() { // Scale start_scale(touchSensorConnected); - scale.tare(); // WDT initialisieren mit 10 Sekunden Timeout bool panic = true; // Wenn true, löst ein WDT-Timeout einen System-Panik aus diff --git a/src/scale.cpp b/src/scale.cpp index 3cf3e59..a5519f1 100644 --- a/src/scale.cpp +++ b/src/scale.cpp @@ -250,7 +250,6 @@ void start_scale(bool touchSensorConnected) { scale.set_scale(calibrationValue); //vTaskDelay(pdMS_TO_TICKS(5000)); - //scale.tare(); // Initialize weight stabilization filter resetWeightFilter(); @@ -258,6 +257,9 @@ void start_scale(bool touchSensorConnected) { // Display Gewicht oledShowWeight(0); + vTaskDelay(1000 / portTICK_PERIOD_MS); + scale.tare(); + Serial.println("starte Scale Task"); BaseType_t result = xTaskCreatePinnedToCore( scale_loop, /* Function to implement the task */