Merge pull request #4174 from gudnimg/check_all_heaters

optimisation: use `CHECK_ALL_HEATERS` in more places
This commit is contained in:
3d-gussner 2023-09-12 16:31:45 +02:00 committed by GitHub
commit 74f724b228
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 5 deletions

View File

@ -7894,9 +7894,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.
@ -9388,11 +9386,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();
} }