From 1eb81fad5dbc88901b4d7602aabc3dda966e724f Mon Sep 17 00:00:00 2001 From: Manuel Weiser Date: Thu, 28 Aug 2025 10:29:21 +0200 Subject: [PATCH] fix: adjust spacing in loop structure and enable tare function in scale loop --- src/main.cpp | 4 +++- src/scale.cpp | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 9c757c8..fd12e8c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -171,7 +171,9 @@ void loop() { oledShowMessage("Scale not calibrated"); vTaskDelay(1000 / portTICK_PERIOD_MS); } - }else{ + } + else + { // Ausgabe der Waage auf Display if(pauseMainTask == 0) { diff --git a/src/scale.cpp b/src/scale.cpp index 201618d..24d8797 100644 --- a/src/scale.cpp +++ b/src/scale.cpp @@ -48,6 +48,8 @@ void scale_loop(void * parameter) { Serial.println("Scale Loop started"); Serial.println("++++++++++++++++++++++++++++++"); + scale.tare(); + for(;;) { if (scale.is_ready()) { @@ -120,7 +122,7 @@ void start_scale(bool touchSensorConnected) { if (scale.wait_ready_timeout(1000)) { scale.set_scale(calibrationValue); // this value is obtained by calibrating the scale with known weights; see the README for details - scale.tare(); + //scale.tare(); } // Display Gewicht