소스 검색

M109 R option if misused could cause a wait-forever situation

jbrazio 9 년 전
부모
커밋
1981e53d68
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4
    0
      Marlin/Marlin_main.cpp

+ 4
- 0
Marlin/Marlin_main.cpp 파일 보기

3940
   // Exit if the temperature is above target and not waiting for cooling
3940
   // Exit if the temperature is above target and not waiting for cooling
3941
   if (no_wait_for_cooling && !isHeatingHotend(target_extruder)) return;
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
   #ifdef TEMP_RESIDENCY_TIME
3947
   #ifdef TEMP_RESIDENCY_TIME
3944
     long residency_start_ms = -1;
3948
     long residency_start_ms = -1;
3945
     // Loop until the temperature has stabilized
3949
     // Loop until the temperature has stabilized

Loading…
취소
저장