|
@@ -3940,6 +3940,10 @@ inline void gcode_M109() {
|
3940
|
3940
|
// Exit if the temperature is above target and not waiting for cooling
|
3941
|
3941
|
if (no_wait_for_cooling && !isHeatingHotend(target_extruder)) return;
|
3942
|
3942
|
|
|
3943
|
+ // Prevents a wait-forever situation if R is misused i.e. M109 R0
|
|
3944
|
+ // Try to calculate a ballpark safe margin by halving EXTRUDE_MINTEMP
|
|
3945
|
+ if (degTargetHotend(target_extruder) < (EXTRUDE_MINTEMP/2)) return;
|
|
3946
|
+
|
3943
|
3947
|
#ifdef TEMP_RESIDENCY_TIME
|
3944
|
3948
|
long residency_start_ms = -1;
|
3945
|
3949
|
// Loop until the temperature has stabilized
|