Add HAS_RESUME_CONTINUE shorthand macro
This commit is contained in:
parent
53e6c33c37
commit
36bda2bade
@ -385,5 +385,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define HAS_SOFTWARE_ENDSTOPS (ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS))
|
#define HAS_SOFTWARE_ENDSTOPS (ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS))
|
||||||
|
#define HAS_RESUME_CONTINUE (ENABLED(NEWPANEL) || ENABLED(EMERGENCY_PARSER))
|
||||||
|
|
||||||
#endif //CONDITIONALS_LCD_H
|
#endif //CONDITIONALS_LCD_H
|
||||||
|
@ -221,7 +221,7 @@ extern bool axis_known_position[XYZ]; // axis[n].is_known
|
|||||||
extern bool axis_homed[XYZ]; // axis[n].is_homed
|
extern bool axis_homed[XYZ]; // axis[n].is_homed
|
||||||
extern volatile bool wait_for_heatup;
|
extern volatile bool wait_for_heatup;
|
||||||
|
|
||||||
#if ENABLED(EMERGENCY_PARSER) || ENABLED(ULTIPANEL)
|
#if HAS_RESUME_CONTINUE
|
||||||
extern volatile bool wait_for_user;
|
extern volatile bool wait_for_user;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -443,7 +443,7 @@ static bool relative_mode = false;
|
|||||||
volatile bool wait_for_heatup = true;
|
volatile bool wait_for_heatup = true;
|
||||||
|
|
||||||
// For M0/M1, this flag may be cleared (by M108) to exit the wait-for-user loop
|
// For M0/M1, this flag may be cleared (by M108) to exit the wait-for-user loop
|
||||||
#if ENABLED(EMERGENCY_PARSER) || ENABLED(ULTIPANEL)
|
#if HAS_RESUME_CONTINUE
|
||||||
volatile bool wait_for_user = false;
|
volatile bool wait_for_user = false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -4967,7 +4967,7 @@ inline void gcode_G92() {
|
|||||||
report_current_position();
|
report_current_position();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if ENABLED(EMERGENCY_PARSER) || ENABLED(ULTIPANEL)
|
#if HAS_RESUME_CONTINUE
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* M0: Unconditional stop - Wait for user button press on LCD
|
* M0: Unconditional stop - Wait for user button press on LCD
|
||||||
@ -5504,7 +5504,7 @@ inline void gcode_M42() {
|
|||||||
pin_state[pin - first_pin] = digitalRead(pin);
|
pin_state[pin - first_pin] = digitalRead(pin);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if ENABLED(EMERGENCY_PARSER) || ENABLED(ULTIPANEL)
|
#if HAS_RESUME_CONTINUE
|
||||||
wait_for_user = true;
|
wait_for_user = true;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -5522,7 +5522,7 @@ inline void gcode_M42() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if ENABLED(EMERGENCY_PARSER) || ENABLED(ULTIPANEL)
|
#if HAS_RESUME_CONTINUE
|
||||||
if (!wait_for_user) break;
|
if (!wait_for_user) break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -9139,7 +9139,7 @@ void process_next_command() {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'M': switch (codenum) {
|
case 'M': switch (codenum) {
|
||||||
#if ENABLED(ULTIPANEL) || ENABLED(EMERGENCY_PARSER)
|
#if HAS_RESUME_CONTINUE
|
||||||
case 0: // M0: Unconditional stop - Wait for user button press on LCD
|
case 0: // M0: Unconditional stop - Wait for user button press on LCD
|
||||||
case 1: // M1: Conditional stop - Wait for user button press on LCD
|
case 1: // M1: Conditional stop - Wait for user button press on LCD
|
||||||
gcode_M0_M1();
|
gcode_M0_M1();
|
||||||
|
Loading…
Reference in New Issue
Block a user