1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-27 13:56:24 +00:00

Allow cold Filament Load/Unload with M302 P1 (#20262)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
pseudex 2020-11-24 23:20:06 +01:00 committed by GitHub
parent ef12425bef
commit 4258ff1a68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -142,10 +142,10 @@ static bool ensure_safe_temperature(const bool wait=true, const PauseMode mode=P
#endif #endif
UNUSED(mode); UNUSED(mode);
if (wait) if (wait) return thermalManager.wait_for_hotend(active_extruder);
return thermalManager.wait_for_hotend(active_extruder);
wait_for_heatup = true; // Allow interruption by Emergency Parser M108 // Allow interruption by Emergency Parser M108
wait_for_heatup = TERN1(PREVENT_COLD_EXTRUSION, !thermalManager.allow_cold_extrude);
while (wait_for_heatup && ABS(thermalManager.degHotend(active_extruder) - thermalManager.degTargetHotend(active_extruder)) > TEMP_WINDOW) while (wait_for_heatup && ABS(thermalManager.degHotend(active_extruder) - thermalManager.degTargetHotend(active_extruder)) > TEMP_WINDOW)
idle(); idle();
wait_for_heatup = false; wait_for_heatup = false;