From 6c97c5595cfdbd88b01a10b5558b184c9b8c4514 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 29 Jun 2017 15:03:04 -0500 Subject: [PATCH 1/2] Add a sanity check for DELTA_AUTO_CALIBRATION --- Marlin/SanityCheck.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Marlin/SanityCheck.h b/Marlin/SanityCheck.h index 73d0fc57b2..19a78c4bf9 100644 --- a/Marlin/SanityCheck.h +++ b/Marlin/SanityCheck.h @@ -480,6 +480,8 @@ static_assert(1 >= 0 #error "You probably want to use Max Endstops for DELTA!" #elif ENABLED(ENABLE_LEVELING_FADE_HEIGHT) && DISABLED(AUTO_BED_LEVELING_BILINEAR) && !UBL_DELTA #error "ENABLE_LEVELING_FADE_HEIGHT on DELTA requires AUTO_BED_LEVELING_BILINEAR or AUTO_BED_LEVELING_UBL." + #elif ENABLED(DELTA_AUTO_CALIBRATION) && !HAS_BED_PROBE + #error "DELTA_AUTO_CALIBRATION requires a probe: FIX_MOUNTED_PROBE, BLTOUCH, SOLENOID_PROBE, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, or Z Servo." #elif ABL_GRID #if (GRID_MAX_POINTS_X & 1) == 0 || (GRID_MAX_POINTS_Y & 1) == 0 #error "DELTA requires GRID_MAX_POINTS_X and GRID_MAX_POINTS_Y to be odd numbers." From 30b327d24c272ea4e5f98179eced17e969c75b09 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 29 Jun 2017 15:11:22 -0500 Subject: [PATCH 2/2] Finish the solution for #7166 --- Marlin/gcode.h | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/Marlin/gcode.h b/Marlin/gcode.h index ac3268d7d4..aa51a57b01 100644 --- a/Marlin/gcode.h +++ b/Marlin/gcode.h @@ -144,10 +144,6 @@ public: #define SEEN_TEST(L) TEST(codebits[LETTER_IND(L)], LETTER_BIT(L)) - // Seen any axis parameter - // Optimized by moving 'X' up to index 24 - FORCE_INLINE bool seen_axis() { return codebits[3] || SEEN_TEST('E'); } - #else // !FASTER_GCODE_PARSER // Code is found in the string. If not found, value_ptr is unchanged. @@ -164,13 +160,13 @@ public: #define SEEN_TEST(L) !!strchr(command_args, L) - // Seen any axis parameter - static bool seen_axis() { - return SEEN_TEST('X') || SEEN_TEST('Y') || SEEN_TEST('Z') || SEEN_TEST('E'); - } - #endif // !FASTER_GCODE_PARSER + // Seen any axis parameter + static bool seen_axis() { + return SEEN_TEST('X') || SEEN_TEST('Y') || SEEN_TEST('Z') || SEEN_TEST('E'); + } + // Populate all fields by parsing a single line of GCode // This uses 54 bytes of SRAM to speed up seen/value static void parse(char * p);