From f9d594570c1527f699c3d3dec749705b5648d06c Mon Sep 17 00:00:00 2001 From: Andrea Baccega Date: Sun, 28 Jan 2024 02:54:53 +0100 Subject: [PATCH] sanity fix --- src/reflow.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/reflow.h b/src/reflow.h index 9de83cc..42c36ec 100644 --- a/src/reflow.h +++ b/src/reflow.h @@ -139,7 +139,7 @@ public: } float getPercentage() { - return (float)timer.elapsed() / (float)(endTimes[4] * 1000); + return (double)timer.elapsed() / (double)(endTimes[4] * 1000); } float getTargetTemp() @@ -165,7 +165,7 @@ public: uint32_t relativeElapsedTime = elapsedMS - startTimeMS; - float percentage = (float)relativeElapsedTime / ((float)(curStep.duration) * 1000); + float percentage = (double)relativeElapsedTime / ((double)(curStep.duration) * 1000); // Serial.println(String(percentage)+ "%" + String(STATE_STR(curStep.state)) + " Elapsed: " + String(elapsedMS) + " ___ " + String(curStep.duration * 1000)); return curStep.calcTempAtPercentage(startTemp, percentage); }