Browse Source

Merge pull request #4284 from thinkyhead/rc_serial_ln_macros

Sled-probe sanity fix, conditionals for remaining types of leveling
Scott Lahteine 8 years ago
parent
commit
0554b65d22
3 changed files with 27 additions and 29 deletions
  1. 10
    0
      Marlin/Conditionals.h
  2. 13
    23
      Marlin/SanityCheck.h
  3. 4
    6
      Marlin/planner.cpp

+ 10
- 0
Marlin/Conditionals.h View File

@@ -813,6 +813,16 @@
813 813
     #ifndef DELTA_DIAGONAL_ROD_TRIM_TOWER_3
814 814
       #define DELTA_DIAGONAL_ROD_TRIM_TOWER_3 0.0
815 815
     #endif
816
+    #if ENABLED(AUTO_BED_LEVELING_GRID)
817
+      #define DELTA_BED_LEVELING_GRID
818
+    #endif
819
+  #endif
820
+
821
+  /**
822
+   * When not using other bed leveling...
823
+   */
824
+  #if ENABLED(AUTO_BED_LEVELING_FEATURE) && DISABLED(AUTO_BED_LEVELING_GRID) && DISABLED(DELTA_BED_LEVELING_GRID)
825
+    #define AUTO_BED_LEVELING_3POINT
816 826
   #endif
817 827
 
818 828
   /**

+ 13
- 23
Marlin/SanityCheck.h View File

@@ -200,11 +200,9 @@
200 200
 #if ENABLED(MESH_BED_LEVELING)
201 201
   #if ENABLED(DELTA)
202 202
     #error "MESH_BED_LEVELING does not yet support DELTA printers."
203
-  #endif
204
-  #if ENABLED(AUTO_BED_LEVELING_FEATURE)
203
+  #elif ENABLED(AUTO_BED_LEVELING_FEATURE)
205 204
     #error "Select AUTO_BED_LEVELING_FEATURE or MESH_BED_LEVELING, not both."
206
-  #endif
207
-  #if MESH_NUM_X_POINTS > 7 || MESH_NUM_Y_POINTS > 7
205
+  #elif MESH_NUM_X_POINTS > 7 || MESH_NUM_Y_POINTS > 7
208 206
     #error "MESH_NUM_X_POINTS and MESH_NUM_Y_POINTS need to be less than 8."
209 207
   #endif
210 208
 #elif ENABLED(MANUAL_BED_LEVELING)
@@ -217,6 +215,10 @@
217 215
 
218 216
 #if PROBE_SELECTED
219 217
 
218
+  #if ENABLED(Z_PROBE_SLED) && ENABLED(DELTA)
219
+    #error "You cannot use Z_PROBE_SLED with DELTA."
220
+  #endif
221
+
220 222
   /**
221 223
    * NUM_SERVOS is required for a Z servo probe
222 224
    */
@@ -325,6 +327,13 @@
325 327
 #if ENABLED(AUTO_BED_LEVELING_FEATURE)
326 328
 
327 329
   /**
330
+   * Delta has limited bed leveling options
331
+   */
332
+  #if ENABLED(DELTA) && DISABLED(AUTO_BED_LEVELING_GRID)
333
+    #error "You must use AUTO_BED_LEVELING_GRID for DELTA bed leveling."
334
+  #endif
335
+
336
+  /**
328 337
    * Require a Z min pin
329 338
    */
330 339
   #if !PIN_EXISTS(Z_MIN)
@@ -409,25 +418,6 @@
409 418
 #endif
410 419
 
411 420
 /**
412
- * Delta has limited bed leveling options
413
- */
414
-#if ENABLED(DELTA)
415
-
416
-  #if ENABLED(AUTO_BED_LEVELING_FEATURE)
417
-
418
-    #if DISABLED(AUTO_BED_LEVELING_GRID)
419
-      #error "Only AUTO_BED_LEVELING_GRID is supported with DELTA."
420
-    #endif
421
-
422
-    #if ENABLED(Z_PROBE_SLED)
423
-      #error "You cannot use Z_PROBE_SLED with DELTA."
424
-    #endif
425
-
426
-  #endif
427
-
428
-#endif
429
-
430
-/**
431 421
  * Don't set more than one kinematic type
432 422
  */
433 423
 #if (ENABLED(DELTA) && (ENABLED(SCARA) || ENABLED(COREXY) || ENABLED(COREXZ) || ENABLED(COREYZ))) \

+ 4
- 6
Marlin/planner.cpp View File

@@ -129,18 +129,16 @@ float Planner::previous_nominal_speed;
129 129
  * Class and Instance Methods
130 130
  */
131 131
 
132
-Planner::Planner() {
133
-  #if ENABLED(AUTO_BED_LEVELING_FEATURE)
134
-    bed_level_matrix.set_to_identity();
135
-  #endif
136
-  init();
137
-}
132
+Planner::Planner() { init(); }
138 133
 
139 134
 void Planner::init() {
140 135
   block_buffer_head = block_buffer_tail = 0;
141 136
   memset(position, 0, sizeof(position)); // clear position
142 137
   for (int i = 0; i < NUM_AXIS; i++) previous_speed[i] = 0.0;
143 138
   previous_nominal_speed = 0.0;
139
+  #if ENABLED(AUTO_BED_LEVELING_FEATURE)
140
+    bed_level_matrix.set_to_identity();
141
+  #endif
144 142
 }
145 143
 
146 144
 /**

Loading…
Cancel
Save