refactor: remove redundant tare calls in setup and start_scale functions

This commit is contained in:
2025-09-01 13:33:12 +02:00
parent 9ae9e80dcd
commit 87288e606b
2 changed files with 3 additions and 2 deletions

View File

@@ -59,7 +59,6 @@ void setup() {
// Scale // Scale
start_scale(touchSensorConnected); start_scale(touchSensorConnected);
scale.tare();
// WDT initialisieren mit 10 Sekunden Timeout // WDT initialisieren mit 10 Sekunden Timeout
bool panic = true; // Wenn true, löst ein WDT-Timeout einen System-Panik aus bool panic = true; // Wenn true, löst ein WDT-Timeout einen System-Panik aus

View File

@@ -250,7 +250,6 @@ void start_scale(bool touchSensorConnected) {
scale.set_scale(calibrationValue); scale.set_scale(calibrationValue);
//vTaskDelay(pdMS_TO_TICKS(5000)); //vTaskDelay(pdMS_TO_TICKS(5000));
//scale.tare();
// Initialize weight stabilization filter // Initialize weight stabilization filter
resetWeightFilter(); resetWeightFilter();
@@ -258,6 +257,9 @@ void start_scale(bool touchSensorConnected) {
// Display Gewicht // Display Gewicht
oledShowWeight(0); oledShowWeight(0);
vTaskDelay(1000 / portTICK_PERIOD_MS);
scale.tare();
Serial.println("starte Scale Task"); Serial.println("starte Scale Task");
BaseType_t result = xTaskCreatePinnedToCore( BaseType_t result = xTaskCreatePinnedToCore(
scale_loop, /* Function to implement the task */ scale_loop, /* Function to implement the task */