소스 검색

Fix stepper shutdown during waiting for temperatures

In the wait loops of M109 M190 idle() is called, what checks
stepper_inactive_time against previous_cmd_ms.
Because we can be several minutes inside the loop, resetting
previous_cmd_ms only outside the loop caused stepper shutdowns.

The name of previous_cmd_ms does not really reflect its use. It's set
not only when a new command was received or executed but also in many of
the movement routines. For that the little extension of using it during
the wait will (hopefully) not hurt.

# Conflicts:
#	Marlin/Configuration_adv.h
AnHardt 9 년 전
부모
커밋
32ae9f9ab7
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2
    2
      Marlin/Marlin_main.cpp

+ 2
- 2
Marlin/Marlin_main.cpp 파일 보기

@@ -3975,6 +3975,7 @@ inline void gcode_M109() {
3975 3975
     }
3976 3976
 
3977 3977
     idle();
3978
+    refresh_cmd_timeout(); // to prevent stepper_inactive_time from running out
3978 3979
 
3979 3980
     #ifdef TEMP_RESIDENCY_TIME
3980 3981
       // start/restart the TEMP_RESIDENCY_TIME timer whenever we reach target temp for the first time
@@ -3989,7 +3990,6 @@ inline void gcode_M109() {
3989 3990
   }
3990 3991
 
3991 3992
   LCD_MESSAGEPGM(MSG_HEATING_COMPLETE);
3992
-  refresh_cmd_timeout();
3993 3993
   print_job_start_ms = previous_cmd_ms;
3994 3994
 }
3995 3995
 
@@ -4024,9 +4024,9 @@ inline void gcode_M109() {
4024 4024
         #endif
4025 4025
       }
4026 4026
       idle();
4027
+      refresh_cmd_timeout(); // to prevent stepper_inactive_time from running out
4027 4028
     }
4028 4029
     LCD_MESSAGEPGM(MSG_BED_DONE);
4029
-    refresh_cmd_timeout();
4030 4030
   }
4031 4031
 
4032 4032
 #endif // HAS_TEMP_BED

Loading…
취소
저장