|
@@ -2728,18 +2728,18 @@ inline void gcode_G0_G1() {
|
2728
|
2728
|
* G4: Dwell S<seconds> or P<milliseconds>
|
2729
|
2729
|
*/
|
2730
|
2730
|
inline void gcode_G4() {
|
2731
|
|
- millis_t codenum = 0;
|
|
2731
|
+ millis_t dwell_ms = 0;
|
2732
|
2732
|
|
2733
|
|
- if (code_seen('P')) codenum = code_value_millis(); // milliseconds to wait
|
2734
|
|
- if (code_seen('S')) codenum = code_value_millis_from_seconds(); // seconds to wait
|
|
2733
|
+ if (code_seen('P')) dwell_ms = code_value_millis(); // milliseconds to wait
|
|
2734
|
+ if (code_seen('S')) dwell_ms = code_value_millis_from_seconds(); // seconds to wait
|
2735
|
2735
|
|
2736
|
2736
|
stepper.synchronize();
|
2737
|
2737
|
refresh_cmd_timeout();
|
2738
|
|
- codenum += previous_cmd_ms; // keep track of when we started waiting
|
|
2738
|
+ dwell_ms += previous_cmd_ms; // keep track of when we started waiting
|
2739
|
2739
|
|
2740
|
2740
|
if (!lcd_hasstatus()) LCD_MESSAGEPGM(MSG_DWELL);
|
2741
|
2741
|
|
2742
|
|
- while (PENDING(millis(), codenum)) idle();
|
|
2742
|
+ while (PENDING(millis(), dwell_ms)) idle();
|
2743
|
2743
|
}
|
2744
|
2744
|
|
2745
|
2745
|
#if ENABLED(BEZIER_CURVE_SUPPORT)
|