optimisation: use CHECK_ALL_HEATERS in more places

Change in memory:
Flash: -162 bytes
SRAM: 0 bytes
This commit is contained in:
Guðni Már Gilbert 2023-04-28 18:29:33 +00:00
parent b0a72f42f1
commit 02859a37c8
1 changed files with 3 additions and 5 deletions

View File

@ -7805,9 +7805,7 @@ Sigma_Exit:
cancel_heatup = false; cancel_heatup = false;
bool is_pinda_cooling = false; bool is_pinda_cooling = false;
if ((degTargetBed() == 0) && (degTargetHotend(0) == 0)) { if (!(CHECK_ALL_HEATERS)) is_pinda_cooling = true;
is_pinda_cooling = true;
}
while ( ((!is_pinda_cooling) && (!cancel_heatup) && (current_temperature_pinda < set_target_pinda)) || (is_pinda_cooling && (current_temperature_pinda > set_target_pinda)) ) { while ( ((!is_pinda_cooling) && (!cancel_heatup) && (current_temperature_pinda < set_target_pinda)) || (is_pinda_cooling && (current_temperature_pinda > set_target_pinda)) ) {
if ((_millis() - codenum) > 1000) //Print Temp Reading every 1 second while waiting. if ((_millis() - codenum) > 1000) //Print Temp Reading every 1 second while waiting.
@ -9257,11 +9255,11 @@ void controllerFan()
*/ */
static void handleSafetyTimer() static void handleSafetyTimer()
{ {
if (printer_active() || (!degTargetBed() && !degTargetHotend(0)) || (!safetytimer_inactive_time)) if (printer_active() || !(CHECK_ALL_HEATERS) || !safetytimer_inactive_time)
{ {
safetyTimer.stop(); safetyTimer.stop();
} }
else if ((degTargetBed() || degTargetHotend(0)) && (!safetyTimer.running())) else if ((CHECK_ALL_HEATERS) && !safetyTimer.running())
{ {
safetyTimer.start(); safetyTimer.start();
} }