Implementing [FR] #7548

Added new configuration to inhibit XYZ movements when home is not done
This commit is contained in:
GMagician 2017-09-02 14:16:39 +02:00 committed by Scott Lahteine
parent ac70048945
commit 33d28c24bf
4 changed files with 39 additions and 13 deletions

View file

@ -1850,7 +1850,7 @@ static void clean_up_after_endstop_or_probe_move() {
return false;
}
#endif
#endif // HAS_AXIS_UNHOMED_ERR
#if ENABLED(Z_PROBE_SLED)
@ -2053,7 +2053,7 @@ static void clean_up_after_endstop_or_probe_move() {
#endif
}
#endif
#endif // Z_PROBE_ALLEN_KEY
#if ENABLED(PROBING_FANS_OFF)
@ -3383,6 +3383,10 @@ inline void gcode_G0_G1(
bool fast_move=false
#endif
) {
#if ENABLED(NO_MOTION_BEFORE_HOMING)
if (axis_unhomed_error()) return;
#endif
if (IsRunning()) {
gcode_get_destination(); // For X Y Z E F
@ -3438,6 +3442,10 @@ inline void gcode_G0_G1(
#if ENABLED(ARC_SUPPORT)
inline void gcode_G2_G3(bool clockwise) {
#if ENABLED(NO_MOTION_BEFORE_HOMING)
if (axis_unhomed_error()) return;
#endif
if (IsRunning()) {
#if ENABLED(SF_ARC_FIX)
@ -3535,6 +3543,10 @@ inline void gcode_G4() {
* G5: Cubic B-spline
*/
inline void gcode_G5() {
#if ENABLED(NO_MOTION_BEFORE_HOMING)
if (axis_unhomed_error()) return;
#endif
if (IsRunning()) {
#if ENABLED(CNC_WORKSPACE_PLANES)
@ -5862,6 +5874,10 @@ void home_all_axes() { gcode_G28(true); }
* G42: Move X & Y axes to mesh coordinates (I & J)
*/
inline void gcode_G42() {
#if ENABLED(NO_MOTION_BEFORE_HOMING)
if (axis_unhomed_error()) return;
#endif
if (IsRunning()) {
const bool hasI = parser.seenval('I');
const int8_t ix = hasI ? parser.value_int() : 0;