From 919fe3e4b87f5da3ef44106e16b5355f64326f37 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 29 Sep 2016 15:06:01 -0500 Subject: [PATCH] Rename feature to G38_PROBE_TARGET --- Marlin/Configuration_adv.h | 6 +++--- Marlin/Marlin.h | 2 +- Marlin/Marlin_main.cpp | 13 +++++++------ Marlin/SanityCheck.h | 6 +++--- Marlin/endstops.cpp | 2 +- 5 files changed, 15 insertions(+), 14 deletions(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 545f5ce8b..ec3ece28e 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -532,9 +532,9 @@ // Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes. //#define BEZIER_CURVE_SUPPORT -// G38 Probe Target -//#define G38_2_3 -#if ENABLED(G38_2_3) +// G38.2 and G38.3 Probe Target +//#define G38_PROBE_TARGET +#if ENABLED(G38_PROBE_TARGET) #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move) #endif diff --git a/Marlin/Marlin.h b/Marlin/Marlin.h index 8fd720cd4..b890b6a27 100644 --- a/Marlin/Marlin.h +++ b/Marlin/Marlin.h @@ -209,7 +209,7 @@ void manage_inactivity(bool ignore_stepper_queue = false); #endif // !MIXING_EXTRUDER -#if ENABLED(G38_2_3) +#if ENABLED(G38_PROBE_TARGET) extern bool G38_move, // flag to tell the interrupt handler that a G38 command is being run G38_endstop_hit; // flag from the interrupt handler to indicate if the endstop went active #endif diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index cadb16940..7bc7c92cb 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -277,7 +277,7 @@ TWIBus i2c; #endif -#if ENABLED(G38_2_3) +#if ENABLED(G38_PROBE_TARGET) bool G38_move = false, G38_endstop_hit = false; #endif @@ -2331,6 +2331,7 @@ static void clean_up_after_endstop_or_probe_move() { #endif // AUTO_BED_LEVELING_BILINEAR + /** * Home an individual linear axis */ @@ -4166,7 +4167,7 @@ inline void gcode_G28() { #endif // HAS_BED_PROBE -#if ENABLED(G38_2_3) +#if ENABLED(G38_PROBE_TARGET) static bool G38_run_probe() { @@ -4252,7 +4253,7 @@ inline void gcode_G28() { clean_up_after_endstop_or_probe_move(); } -#endif // G38_2_3 +#endif // G38_PROBE_TARGET /** * G92: Set current position to given X Y Z E @@ -7376,7 +7377,7 @@ void process_next_command() { while (*cmd_ptr == ' ') cmd_ptr++; // Allow for decimal point in command - #if ENABLED(G38_2_3) + #if ENABLED(G38_PROBE_TARGET) uint8_t subcode = 0; #endif @@ -7393,7 +7394,7 @@ void process_next_command() { } while (NUMERIC(*cmd_ptr)); // Allow for decimal point in command - #if ENABLED(G38_2_3) + #if ENABLED(G38_PROBE_TARGET) if (*cmd_ptr == '.') { cmd_ptr++; while (NUMERIC(*cmd_ptr)) @@ -7501,7 +7502,7 @@ void process_next_command() { #endif // Z_PROBE_SLED #endif // HAS_BED_PROBE - #if ENABLED(G38_2_3) + #if ENABLED(G38_PROBE_TARGET) case 38: // G38.2 & G38.3 if (subcode == 2 || subcode == 3) gcode_G38(subcode == 2); diff --git a/Marlin/SanityCheck.h b/Marlin/SanityCheck.h index 2d6414fb2..b2c9bfc54 100644 --- a/Marlin/SanityCheck.h +++ b/Marlin/SanityCheck.h @@ -854,11 +854,11 @@ /** * G38 Probe Target */ -#if ENABLED(G38_2_3) +#if ENABLED(G38_PROBE_TARGET) #if !HAS_BED_PROBE - #error "G38_2_3 requires a bed probe." + #error "G38_PROBE_TARGET requires a bed probe." #elif !IS_CARTESIAN - #error "G38_2_3 requires a Cartesian machine." + #error "G38_PROBE_TARGET requires a Cartesian machine." #endif #endif diff --git a/Marlin/endstops.cpp b/Marlin/endstops.cpp index 7bb2fda71..ffc8c6963 100644 --- a/Marlin/endstops.cpp +++ b/Marlin/endstops.cpp @@ -252,7 +252,7 @@ void Endstops::update() { } \ } while(0) - #if ENABLED(G38_2_3) && PIN_EXISTS(Z_MIN) // If G38 command then check Z_MIN for every axis and every direction + #if ENABLED(G38_PROBE_TARGET) && PIN_EXISTS(Z_MIN) // If G38 command then check Z_MIN for every axis and every direction #define UPDATE_ENDSTOP(AXIS,MINMAX) do { \ _UPDATE_ENDSTOP(AXIS,MINMAX,NOOP); \