Browse Source

Merge pull request #7187 from thinkyhead/bf_sanitycheck_G33

Add a sanity check for DELTA_AUTO_CALIBRATION
Scott Lahteine 7 years ago
parent
commit
457489d7ac
2 changed files with 7 additions and 9 deletions
  1. 2
    0
      Marlin/SanityCheck.h
  2. 5
    9
      Marlin/gcode.h

+ 2
- 0
Marlin/SanityCheck.h View File

480
     #error "You probably want to use Max Endstops for DELTA!"
480
     #error "You probably want to use Max Endstops for DELTA!"
481
   #elif ENABLED(ENABLE_LEVELING_FADE_HEIGHT) && DISABLED(AUTO_BED_LEVELING_BILINEAR) && !UBL_DELTA
481
   #elif ENABLED(ENABLE_LEVELING_FADE_HEIGHT) && DISABLED(AUTO_BED_LEVELING_BILINEAR) && !UBL_DELTA
482
     #error "ENABLE_LEVELING_FADE_HEIGHT on DELTA requires AUTO_BED_LEVELING_BILINEAR or AUTO_BED_LEVELING_UBL."
482
     #error "ENABLE_LEVELING_FADE_HEIGHT on DELTA requires AUTO_BED_LEVELING_BILINEAR or AUTO_BED_LEVELING_UBL."
483
+  #elif ENABLED(DELTA_AUTO_CALIBRATION) && !HAS_BED_PROBE
484
+    #error "DELTA_AUTO_CALIBRATION requires a probe: FIX_MOUNTED_PROBE, BLTOUCH, SOLENOID_PROBE, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, or Z Servo."
483
   #elif ABL_GRID
485
   #elif ABL_GRID
484
     #if (GRID_MAX_POINTS_X & 1) == 0 || (GRID_MAX_POINTS_Y & 1) == 0
486
     #if (GRID_MAX_POINTS_X & 1) == 0 || (GRID_MAX_POINTS_Y & 1) == 0
485
       #error "DELTA requires GRID_MAX_POINTS_X and GRID_MAX_POINTS_Y to be odd numbers."
487
       #error "DELTA requires GRID_MAX_POINTS_X and GRID_MAX_POINTS_Y to be odd numbers."

+ 5
- 9
Marlin/gcode.h View File

144
 
144
 
145
     #define SEEN_TEST(L) TEST(codebits[LETTER_IND(L)], LETTER_BIT(L))
145
     #define SEEN_TEST(L) TEST(codebits[LETTER_IND(L)], LETTER_BIT(L))
146
 
146
 
147
-    // Seen any axis parameter
148
-    // Optimized by moving 'X' up to index 24
149
-    FORCE_INLINE bool seen_axis() { return codebits[3] || SEEN_TEST('E'); }
150
-
151
   #else // !FASTER_GCODE_PARSER
147
   #else // !FASTER_GCODE_PARSER
152
 
148
 
153
     // Code is found in the string. If not found, value_ptr is unchanged.
149
     // Code is found in the string. If not found, value_ptr is unchanged.
164
 
160
 
165
     #define SEEN_TEST(L) !!strchr(command_args, L)
161
     #define SEEN_TEST(L) !!strchr(command_args, L)
166
 
162
 
167
-    // Seen any axis parameter
168
-    static bool seen_axis() {
169
-      return SEEN_TEST('X') || SEEN_TEST('Y') || SEEN_TEST('Z') || SEEN_TEST('E');
170
-    }
171
-
172
   #endif // !FASTER_GCODE_PARSER
163
   #endif // !FASTER_GCODE_PARSER
173
 
164
 
165
+  // Seen any axis parameter
166
+  static bool seen_axis() {
167
+    return SEEN_TEST('X') || SEEN_TEST('Y') || SEEN_TEST('Z') || SEEN_TEST('E');
168
+  }
169
+
174
   // Populate all fields by parsing a single line of GCode
170
   // Populate all fields by parsing a single line of GCode
175
   // This uses 54 bytes of SRAM to speed up seen/value
171
   // This uses 54 bytes of SRAM to speed up seen/value
176
   static void parse(char * p);
172
   static void parse(char * p);

Loading…
Cancel
Save