From a594c07103cec87746766fe73a6a7c5ace9d7206 Mon Sep 17 00:00:00 2001 From: Andrea Baccega Date: Sun, 28 Jan 2024 16:55:27 +0100 Subject: [PATCH] minor fixes --- src/displays/tft.cpp | 8 ++++---- src/leds/leds.h | 7 +++++-- src/reflow.h | 3 ++- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/displays/tft.cpp b/src/displays/tft.cpp index e4b075d..d2d1e82 100644 --- a/src/displays/tft.cpp +++ b/src/displays/tft.cpp @@ -59,10 +59,10 @@ void TFT_Display::drawRealTemp(double *temp, float percentage) float temperature = static_cast(*temp); - // Serial.print("Time:"); - // Serial.print(time); - // Serial.print(" Temp:"); - // Serial.println(temperature); + Serial.print("Time:"); + Serial.print(percentage); + Serial.print(" Temp:"); + Serial.println(temperature); uint16_t eplased = drawTimer.elapsed(); diff --git a/src/leds/leds.h b/src/leds/leds.h index e9a766e..1cc00c4 100644 --- a/src/leds/leds.h +++ b/src/leds/leds.h @@ -4,11 +4,14 @@ #include "../common.h" #include "../globals.h" -// If you didnt solder the LEDS in order, change the order here just change the pin numbers till it matches your board + +#define GREEN_LED_PIN RIGHT_LED_PIN + +// DO NOT TOUCH #define LEFT_LED_PIN 20 //Should be RED #define MID_LED_PIN 19 //Should be YELLOW #define RIGHT_LED_PIN 18 //Should be GREEN -#define GREEN_LED_PIN RIGHT_LED_PIN + enum LedDesiredState diff --git a/src/reflow.h b/src/reflow.h index eb8c12a..82eb4b9 100644 --- a/src/reflow.h +++ b/src/reflow.h @@ -110,6 +110,7 @@ public: endTimes[2] = endTimes[1] + steps[2].duration; endTimes[3] = endTimes[2] + steps[3].duration; endTimes[4] = endTimes[3] + steps[4].duration; + startTimes[0] = 0; startTimes[1] = endTimes[0]; @@ -147,7 +148,7 @@ public: float getPercentage() { - return timer.elapsed() / TOMILLIS(endTimes[4]); + return timer.elapsed() / (double)TOMILLIS(endTimes[4]); } float getTargetTemp()