From f0eced85858170631bdfd257705178d050a161e3 Mon Sep 17 00:00:00 2001 From: Manuel Weiser Date: Fri, 29 Aug 2025 18:30:58 +0200 Subject: [PATCH] fix: increase delay in start_scale function for improved stability --- src/scale.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/scale.cpp b/src/scale.cpp index d3ba2e0..3ee71c6 100644 --- a/src/scale.cpp +++ b/src/scale.cpp @@ -111,7 +111,7 @@ void start_scale(bool touchSensorConnected) { scale.begin(LOADCELL_DOUT_PIN, LOADCELL_SCK_PIN); oledShowProgressBar(6, 7, DISPLAY_BOOT_TEXT, "Tare scale"); - for (uint16_t i = 0; i < 2000; i++) { + for (uint16_t i = 0; i < 3000; i++) { yield(); vTaskDelay(pdMS_TO_TICKS(1)); esp_task_wdt_reset(); @@ -121,7 +121,8 @@ void start_scale(bool touchSensorConnected) { vTaskDelay(pdMS_TO_TICKS(5000)); } - scale.set_scale(calibrationValue); // this value is obtained by calibrating the scale with known weights; see the README for details + scale.set_scale(calibrationValue); + vTaskDelay(pdMS_TO_TICKS(5000)); scale.tare(); // Display Gewicht