From 972d2fffacc27cf51165ea249a953422d36978b7 Mon Sep 17 00:00:00 2001 From: Aaronjamt <13600347+aaronjamt@users.noreply.github.com> Date: Fri, 29 Jul 2022 10:53:21 -0700 Subject: [PATCH] Allow preheating iron during boot logo Autostart (if enabled) _before_ showing boot logo (rather than waiting for the entire animation to finish). Only heats if the boot logo is on but not infinite (and autostart is set to heat). Heats to sleep temperature or 75*C, whichever is lower, for safety (and if the iron can get to 75* by the time the logo disappears then this really doesn't matter much). This is purely a preheat if your iron is low-powered and takes a long time to warm and so if autostart is set to heat to soldering temperature, it will start heating the rest of the way once the boot logo disappears. --- source/Core/Threads/GUIThread.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/source/Core/Threads/GUIThread.cpp b/source/Core/Threads/GUIThread.cpp index 22166db4..71762ac4 100644 --- a/source/Core/Threads/GUIThread.cpp +++ b/source/Core/Threads/GUIThread.cpp @@ -972,6 +972,22 @@ void startGUITask(void const *argument) { } #endif #endif + // If the boot logo is enabled (but it times out) and the autostart mode is enabled (but not set to sleep w/o heat), start heating during boot logo + if (getSettingValue(SettingsOptions::LOGOTime) > 0 && + getSettingValue(SettingsOptions::LOGOTime) < 5 && + getSettingValue(SettingsOptions::AutoStartMode) > 0 && + getSettingValue(SettingsOptions::AutoStartMode) < 3) { + uint16_t sleepTempDegC; + if (getSettingValue(SettingsOptions::TemperatureInF)) { + sleepTempDegC = TipThermoModel::convertFtoC(getSettingValue(SettingsOptions::SleepTemp)); + } else { + sleepTempDegC = getSettingValue(SettingsOptions::SleepTemp); + } + // Only heat to sleep temperature (but no higher than 75*C for safety) + currentTempTargetDegC = min(sleepTempDegC, 75); + } + + BootLogo::handleShowingLogo((uint8_t *)FLASH_LOGOADDR); showWarnings();