Browse Source

Merge pull request #4651 from thinkyhead/rc_homing_vs_leveling_z

Improvements to homing / leveling
Scott Lahteine 9 years ago
parent
commit
4d4c00d69c

+ 1
- 1
Marlin/Configuration.h View File

689
 
689
 
690
     // Set the number of grid points per dimension.
690
     // Set the number of grid points per dimension.
691
     // You probably don't need more than 3 (squared=9).
691
     // You probably don't need more than 3 (squared=9).
692
-    #define AUTO_BED_LEVELING_GRID_POINTS 2
692
+    #define AUTO_BED_LEVELING_GRID_POINTS 3
693
 
693
 
694
   #else  // !AUTO_BED_LEVELING_GRID
694
   #else  // !AUTO_BED_LEVELING_GRID
695
 
695
 

+ 1
- 0
Marlin/Marlin.h View File

379
   extern float mixing_factor[MIXING_STEPPERS];
379
   extern float mixing_factor[MIXING_STEPPERS];
380
 #endif
380
 #endif
381
 
381
 
382
+void update_software_endstops(AxisEnum axis);
382
 void calculate_volumetric_multipliers();
383
 void calculate_volumetric_multipliers();
383
 
384
 
384
 // Buzzer
385
 // Buzzer

+ 79
- 51
Marlin/Marlin_main.cpp View File

1470
  * the software endstop positions must be refreshed to remain
1470
  * the software endstop positions must be refreshed to remain
1471
  * at the same positions relative to the machine.
1471
  * at the same positions relative to the machine.
1472
  */
1472
  */
1473
-static void update_software_endstops(AxisEnum axis) {
1473
+void update_software_endstops(AxisEnum axis) {
1474
   float offs = LOGICAL_POSITION(0, axis);
1474
   float offs = LOGICAL_POSITION(0, axis);
1475
 
1475
 
1476
   #if ENABLED(DUAL_X_CARRIAGE)
1476
   #if ENABLED(DUAL_X_CARRIAGE)
1530
 static void set_axis_is_at_home(AxisEnum axis) {
1530
 static void set_axis_is_at_home(AxisEnum axis) {
1531
   #if ENABLED(DEBUG_LEVELING_FEATURE)
1531
   #if ENABLED(DEBUG_LEVELING_FEATURE)
1532
     if (DEBUGGING(LEVELING)) {
1532
     if (DEBUGGING(LEVELING)) {
1533
-      SERIAL_ECHOPAIR(">>> set_axis_is_at_home(", axis);
1533
+      SERIAL_ECHOPAIR(">>> set_axis_is_at_home(", axis_codes[axis]);
1534
       SERIAL_ECHOLNPGM(")");
1534
       SERIAL_ECHOLNPGM(")");
1535
     }
1535
     }
1536
   #endif
1536
   #endif
1606
   }
1606
   }
1607
   #if ENABLED(DEBUG_LEVELING_FEATURE)
1607
   #if ENABLED(DEBUG_LEVELING_FEATURE)
1608
     if (DEBUGGING(LEVELING)) {
1608
     if (DEBUGGING(LEVELING)) {
1609
-      SERIAL_ECHOPAIR("<<< set_axis_is_at_home(", axis);
1609
+      SERIAL_ECHOPAIR("<<< set_axis_is_at_home(", axis_codes[axis]);
1610
       SERIAL_ECHOLNPGM(")");
1610
       SERIAL_ECHOLNPGM(")");
1611
     }
1611
     }
1612
   #endif
1612
   #endif
1638
   planner.buffer_line(current_position[X_AXIS], current_position[Y_AXIS], zPosition, current_position[E_AXIS], feedrate_mm_s, active_extruder);
1638
   planner.buffer_line(current_position[X_AXIS], current_position[Y_AXIS], zPosition, current_position[E_AXIS], feedrate_mm_s, active_extruder);
1639
 }
1639
 }
1640
 
1640
 
1641
-inline void line_to_axis_pos(AxisEnum axis, float where, float fr_mm_s = 0.0) {
1642
-  float old_feedrate_mm_s = feedrate_mm_s;
1643
-  current_position[axis] = where;
1644
-  feedrate_mm_s = (fr_mm_s != 0.0) ? fr_mm_s : homing_feedrate_mm_s[axis];
1645
-  planner.buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], feedrate_mm_s, active_extruder);
1646
-  stepper.synchronize();
1647
-  feedrate_mm_s = old_feedrate_mm_s;
1648
-}
1649
-
1650
 //
1641
 //
1651
 // line_to_destination
1642
 // line_to_destination
1652
 // Move the planner, not necessarily synced with current_position
1643
 // Move the planner, not necessarily synced with current_position
2127
     return false;
2118
     return false;
2128
   }
2119
   }
2129
 
2120
 
2121
+  static void do_probe_move(float z, float fr_mm_m) {
2122
+    #if ENABLED(DEBUG_LEVELING_FEATURE)
2123
+      if (DEBUGGING(LEVELING)) DEBUG_POS(">>> do_probe_move", current_position);
2124
+    #endif
2125
+
2126
+    // Move down until probe triggered
2127
+    do_blocking_move_to_z(LOGICAL_Z_POSITION(z), MMM_TO_MMS(fr_mm_m));
2128
+
2129
+    // Clear endstop flags
2130
+    endstops.hit_on_purpose();
2131
+
2132
+    // Get Z where the steppers were interrupted
2133
+    set_current_from_steppers_for_axis(Z_AXIS);
2134
+
2135
+    // Tell the planner where we actually are
2136
+    SYNC_PLAN_POSITION_KINEMATIC();
2137
+
2138
+    #if ENABLED(DEBUG_LEVELING_FEATURE)
2139
+      if (DEBUGGING(LEVELING)) DEBUG_POS("<<< do_probe_move", current_position);
2140
+    #endif
2141
+  }
2142
+
2130
   // Do a single Z probe and return with current_position[Z_AXIS]
2143
   // Do a single Z probe and return with current_position[Z_AXIS]
2131
   // at the height where the probe triggered.
2144
   // at the height where the probe triggered.
2132
   static float run_z_probe() {
2145
   static float run_z_probe() {
2133
 
2146
 
2147
+    #if ENABLED(DEBUG_LEVELING_FEATURE)
2148
+      if (DEBUGGING(LEVELING)) DEBUG_POS(">>> run_z_probe", current_position);
2149
+    #endif
2150
+
2134
     // Prevent stepper_inactive_time from running out and EXTRUDER_RUNOUT_PREVENT from extruding
2151
     // Prevent stepper_inactive_time from running out and EXTRUDER_RUNOUT_PREVENT from extruding
2135
     refresh_cmd_timeout();
2152
     refresh_cmd_timeout();
2136
 
2153
 
2139
     #endif
2156
     #endif
2140
 
2157
 
2141
     #if ENABLED(PROBE_DOUBLE_TOUCH)
2158
     #if ENABLED(PROBE_DOUBLE_TOUCH)
2142
-      do_blocking_move_to_z(-(Z_MAX_LENGTH + 10), MMM_TO_MMS(Z_PROBE_SPEED_FAST));
2143
-      endstops.hit_on_purpose();
2144
-      set_current_from_steppers_for_axis(Z_AXIS);
2145
-      SYNC_PLAN_POSITION_KINEMATIC();
2146
 
2159
 
2147
-      // move up the retract distance
2160
+      // Do a first probe at the fast speed
2161
+      do_probe_move(-(Z_MAX_LENGTH) - 10, Z_PROBE_SPEED_FAST);
2162
+
2163
+      // move up by the bump distance
2148
       do_blocking_move_to_z(current_position[Z_AXIS] + home_bump_mm(Z_AXIS), MMM_TO_MMS(Z_PROBE_SPEED_FAST));
2164
       do_blocking_move_to_z(current_position[Z_AXIS] + home_bump_mm(Z_AXIS), MMM_TO_MMS(Z_PROBE_SPEED_FAST));
2165
+
2149
     #else
2166
     #else
2167
+
2150
       // move fast, close to the bed
2168
       // move fast, close to the bed
2151
-      do_blocking_move_to_z(home_bump_mm(Z_AXIS), MMM_TO_MMS(Z_PROBE_SPEED_FAST));
2169
+      float z = LOGICAL_Z_POSITION(home_bump_mm(Z_AXIS));
2170
+      if (zprobe_zoffset < 0) z -= zprobe_zoffset;
2171
+      do_blocking_move_to_z(z, MMM_TO_MMS(Z_PROBE_SPEED_FAST));
2172
+
2152
     #endif
2173
     #endif
2153
 
2174
 
2154
     // move down slowly to find bed
2175
     // move down slowly to find bed
2155
-    do_blocking_move_to_z(current_position[Z_AXIS] -2.0*home_bump_mm(Z_AXIS), MMM_TO_MMS(Z_PROBE_SPEED_SLOW));
2156
-    endstops.hit_on_purpose();
2157
-    set_current_from_steppers_for_axis(Z_AXIS);
2158
-    SYNC_PLAN_POSITION_KINEMATIC();
2176
+    do_probe_move(-10, Z_PROBE_SPEED_SLOW);
2159
 
2177
 
2160
     #if ENABLED(DEBUG_LEVELING_FEATURE)
2178
     #if ENABLED(DEBUG_LEVELING_FEATURE)
2161
-      if (DEBUGGING(LEVELING)) DEBUG_POS("run_z_probe", current_position);
2179
+      if (DEBUGGING(LEVELING)) DEBUG_POS("<<< run_z_probe", current_position);
2162
     #endif
2180
     #endif
2163
 
2181
 
2164
     return current_position[Z_AXIS];
2182
     return current_position[Z_AXIS];
2393
  * Home an individual axis
2411
  * Home an individual axis
2394
  */
2412
  */
2395
 
2413
 
2414
+static void do_homing_move(AxisEnum axis, float where, float fr_mm_s = 0.0) {
2415
+  float old_feedrate_mm_s = feedrate_mm_s;
2416
+  current_position[axis] = where;
2417
+  feedrate_mm_s = (fr_mm_s != 0.0) ? fr_mm_s : homing_feedrate_mm_s[axis];
2418
+  planner.buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], feedrate_mm_s, active_extruder);
2419
+  stepper.synchronize();
2420
+  feedrate_mm_s = old_feedrate_mm_s;
2421
+}
2422
+
2396
 #define HOMEAXIS(LETTER) homeaxis(LETTER##_AXIS)
2423
 #define HOMEAXIS(LETTER) homeaxis(LETTER##_AXIS)
2397
 
2424
 
2398
 static void homeaxis(AxisEnum axis) {
2425
 static void homeaxis(AxisEnum axis) {
2403
 
2430
 
2404
   #if ENABLED(DEBUG_LEVELING_FEATURE)
2431
   #if ENABLED(DEBUG_LEVELING_FEATURE)
2405
     if (DEBUGGING(LEVELING)) {
2432
     if (DEBUGGING(LEVELING)) {
2406
-      SERIAL_ECHOPAIR(">>> homeaxis(", axis);
2433
+      SERIAL_ECHOPAIR(">>> homeaxis(", axis_codes[axis]);
2407
       SERIAL_ECHOLNPGM(")");
2434
       SERIAL_ECHOLNPGM(")");
2408
     }
2435
     }
2409
   #endif
2436
   #endif
2415
     home_dir(axis);
2442
     home_dir(axis);
2416
 
2443
 
2417
   // Homing Z towards the bed? Deploy the Z probe or endstop.
2444
   // Homing Z towards the bed? Deploy the Z probe or endstop.
2418
-  #if HAS_BED_PROBE && DISABLED(Z_MIN_PROBE_ENDSTOP)
2419
-    if (axis == Z_AXIS && axis_home_dir < 0) {
2445
+  #if HAS_BED_PROBE && Z_HOME_DIR < 0 && DISABLED(Z_MIN_PROBE_ENDSTOP)
2446
+    if (axis == Z_AXIS) {
2420
       #if ENABLED(DEBUG_LEVELING_FEATURE)
2447
       #if ENABLED(DEBUG_LEVELING_FEATURE)
2421
         if (DEBUGGING(LEVELING)) SERIAL_ECHOPGM("> ");
2448
         if (DEBUGGING(LEVELING)) SERIAL_ECHOPGM("> ");
2422
       #endif
2449
       #endif
2434
   #endif
2461
   #endif
2435
 
2462
 
2436
   // Move towards the endstop until an endstop is triggered
2463
   // Move towards the endstop until an endstop is triggered
2437
-  line_to_axis_pos(axis, 1.5 * max_length(axis) * axis_home_dir);
2464
+  do_homing_move(axis, 1.5 * max_length(axis) * axis_home_dir);
2438
 
2465
 
2439
   // Set the axis position as setup for the move
2466
   // Set the axis position as setup for the move
2440
   current_position[axis] = 0;
2467
   current_position[axis] = 0;
2441
   sync_plan_position();
2468
   sync_plan_position();
2442
 
2469
 
2443
   // Move away from the endstop by the axis HOME_BUMP_MM
2470
   // Move away from the endstop by the axis HOME_BUMP_MM
2444
-  line_to_axis_pos(axis, -home_bump_mm(axis) * axis_home_dir);
2471
+  do_homing_move(axis, -home_bump_mm(axis) * axis_home_dir);
2445
 
2472
 
2446
   // Move slowly towards the endstop until triggered
2473
   // Move slowly towards the endstop until triggered
2447
-  line_to_axis_pos(axis, 2 * home_bump_mm(axis) * axis_home_dir, get_homing_bump_feedrate(axis));
2474
+  do_homing_move(axis, 2 * home_bump_mm(axis) * axis_home_dir, get_homing_bump_feedrate(axis));
2448
 
2475
 
2449
   // reset current_position to 0 to reflect hitting endpoint
2476
   // reset current_position to 0 to reflect hitting endpoint
2450
   current_position[axis] = 0;
2477
   current_position[axis] = 0;
2468
       if (lockZ1) stepper.set_z_lock(true); else stepper.set_z2_lock(true);
2495
       if (lockZ1) stepper.set_z_lock(true); else stepper.set_z2_lock(true);
2469
 
2496
 
2470
       // Move to the adjusted endstop height
2497
       // Move to the adjusted endstop height
2471
-      line_to_axis_pos(axis, adj);
2498
+      do_homing_move(axis, adj);
2472
 
2499
 
2473
       if (lockZ1) stepper.set_z_lock(false); else stepper.set_z2_lock(false);
2500
       if (lockZ1) stepper.set_z_lock(false); else stepper.set_z2_lock(false);
2474
       stepper.set_homing_flag(false);
2501
       stepper.set_homing_flag(false);
2477
 
2504
 
2478
   #if ENABLED(DELTA)
2505
   #if ENABLED(DELTA)
2479
     // retrace by the amount specified in endstop_adj
2506
     // retrace by the amount specified in endstop_adj
2480
-    if (endstop_adj[axis] * axis_home_dir < 0) {
2507
+    if (endstop_adj[axis] * Z_HOME_DIR < 0) {
2481
       #if ENABLED(DEBUG_LEVELING_FEATURE)
2508
       #if ENABLED(DEBUG_LEVELING_FEATURE)
2482
         if (DEBUGGING(LEVELING)) {
2509
         if (DEBUGGING(LEVELING)) {
2483
           SERIAL_ECHOPAIR("> endstop_adj = ", endstop_adj[axis]);
2510
           SERIAL_ECHOPAIR("> endstop_adj = ", endstop_adj[axis]);
2484
           DEBUG_POS("", current_position);
2511
           DEBUG_POS("", current_position);
2485
         }
2512
         }
2486
       #endif
2513
       #endif
2487
-      line_to_axis_pos(axis, endstop_adj[axis]);
2514
+      do_homing_move(axis, endstop_adj[axis]);
2488
     }
2515
     }
2489
   #endif
2516
   #endif
2490
 
2517
 
2503
   axis_homed[axis] = true;
2530
   axis_homed[axis] = true;
2504
 
2531
 
2505
   // Put away the Z probe
2532
   // Put away the Z probe
2506
-  #if HAS_BED_PROBE && DISABLED(Z_MIN_PROBE_ENDSTOP)
2507
-    if (axis == Z_AXIS && axis_home_dir < 0) {
2533
+  #if HAS_BED_PROBE && Z_HOME_DIR < 0 && DISABLED(Z_MIN_PROBE_ENDSTOP)
2534
+    if (axis == Z_AXIS) {
2508
       #if ENABLED(DEBUG_LEVELING_FEATURE)
2535
       #if ENABLED(DEBUG_LEVELING_FEATURE)
2509
         if (DEBUGGING(LEVELING)) SERIAL_ECHOPGM("> ");
2536
         if (DEBUGGING(LEVELING)) SERIAL_ECHOPGM("> ");
2510
       #endif
2537
       #endif
2514
 
2541
 
2515
   #if ENABLED(DEBUG_LEVELING_FEATURE)
2542
   #if ENABLED(DEBUG_LEVELING_FEATURE)
2516
     if (DEBUGGING(LEVELING)) {
2543
     if (DEBUGGING(LEVELING)) {
2517
-      SERIAL_ECHOPAIR("<<< homeaxis(", axis);
2544
+      SERIAL_ECHOPAIR("<<< homeaxis(", axis_codes[axis]);
2518
       SERIAL_ECHOLNPGM(")");
2545
       SERIAL_ECHOLNPGM(")");
2519
     }
2546
     }
2520
   #endif
2547
   #endif
2521
-}
2548
+} // homeaxis()
2522
 
2549
 
2523
 #if ENABLED(FWRETRACT)
2550
 #if ENABLED(FWRETRACT)
2524
 
2551
 
3475
 
3502
 
3476
     int verbose_level = code_seen('V') ? code_value_int() : 1;
3503
     int verbose_level = code_seen('V') ? code_value_int() : 1;
3477
     if (verbose_level < 0 || verbose_level > 4) {
3504
     if (verbose_level < 0 || verbose_level > 4) {
3478
-      SERIAL_ECHOLNPGM("?(V)erbose Level is implausible (0-4).");
3505
+      SERIAL_PROTOCOLLNPGM("?(V)erbose Level is implausible (0-4).");
3479
       return;
3506
       return;
3480
     }
3507
     }
3481
 
3508
 
3587
     #if ENABLED(AUTO_BED_LEVELING_GRID)
3614
     #if ENABLED(AUTO_BED_LEVELING_GRID)
3588
 
3615
 
3589
       // probe at the points of a lattice grid
3616
       // probe at the points of a lattice grid
3590
-      const int xGridSpacing = (right_probe_bed_position - left_probe_bed_position) / (auto_bed_leveling_grid_points - 1),
3591
-                yGridSpacing = (back_probe_bed_position - front_probe_bed_position) / (auto_bed_leveling_grid_points - 1);
3617
+      const float xGridSpacing = (right_probe_bed_position - left_probe_bed_position) / (auto_bed_leveling_grid_points - 1),
3618
+                  yGridSpacing = (back_probe_bed_position - front_probe_bed_position) / (auto_bed_leveling_grid_points - 1);
3592
 
3619
 
3593
       #if ENABLED(DELTA)
3620
       #if ENABLED(DELTA)
3594
-        delta_grid_spacing[0] = xGridSpacing;
3595
-        delta_grid_spacing[1] = yGridSpacing;
3621
+        delta_grid_spacing[X_AXIS] = xGridSpacing;
3622
+        delta_grid_spacing[Y_AXIS] = yGridSpacing;
3596
         float zoffset = zprobe_zoffset;
3623
         float zoffset = zprobe_zoffset;
3597
         if (code_seen('Z')) zoffset += code_value_axis_units(Z_AXIS);
3624
         if (code_seen('Z')) zoffset += code_value_axis_units(Z_AXIS);
3598
       #else // !DELTA
3625
       #else // !DELTA
3614
       #endif // !DELTA
3641
       #endif // !DELTA
3615
 
3642
 
3616
       int probePointCounter = 0;
3643
       int probePointCounter = 0;
3617
-      bool zig = (auto_bed_leveling_grid_points & 1) ? true : false; //always end at [RIGHT_PROBE_BED_POSITION, BACK_PROBE_BED_POSITION]
3644
+      bool zig = auto_bed_leveling_grid_points & 1; //always end at [RIGHT_PROBE_BED_POSITION, BACK_PROBE_BED_POSITION]
3618
 
3645
 
3619
       for (int yCount = 0; yCount < auto_bed_leveling_grid_points; yCount++) {
3646
       for (int yCount = 0; yCount < auto_bed_leveling_grid_points; yCount++) {
3620
-        double yProbe = front_probe_bed_position + yGridSpacing * yCount;
3647
+        float yBase = front_probe_bed_position + yGridSpacing * yCount,
3648
+              yProbe = floor(yProbe + (yProbe < 0 ? 0 : 0.5));
3621
         int xStart, xStop, xInc;
3649
         int xStart, xStop, xInc;
3622
 
3650
 
3623
         if (zig) {
3651
         if (zig) {
3634
         zig = !zig;
3662
         zig = !zig;
3635
 
3663
 
3636
         for (int xCount = xStart; xCount != xStop; xCount += xInc) {
3664
         for (int xCount = xStart; xCount != xStop; xCount += xInc) {
3637
-          double xProbe = left_probe_bed_position + xGridSpacing * xCount;
3665
+          float xBase = left_probe_bed_position + xGridSpacing * xCount,
3666
+                xProbe = floor(xProbe + (xProbe < 0 ? 0 : 0.5));
3638
 
3667
 
3639
           #if ENABLED(DELTA)
3668
           #if ENABLED(DELTA)
3640
-            // Avoid probing the corners (outside the round or hexagon print surface) on a delta printer.
3641
-            float distance_from_center = HYPOT(xProbe, yProbe);
3642
-            if (distance_from_center > DELTA_PROBEABLE_RADIUS) continue;
3643
-          #endif //DELTA
3669
+            // Avoid probing outside the round or hexagonal area of a delta printer
3670
+            if (sq(xProbe) + sq(yProbe) > sq(DELTA_PROBEABLE_RADIUS)) continue;
3671
+          #endif
3644
 
3672
 
3645
           float measured_z = probe_pt(xProbe, yProbe, stow_probe_after_each, verbose_level);
3673
           float measured_z = probe_pt(xProbe, yProbe, stow_probe_after_each, verbose_level);
3646
 
3674
 
7875
 
7903
 
7876
     // Adjust print surface height by linear interpolation over the bed_level array.
7904
     // Adjust print surface height by linear interpolation over the bed_level array.
7877
     void adjust_delta(float cartesian[3]) {
7905
     void adjust_delta(float cartesian[3]) {
7878
-      if (delta_grid_spacing[0] == 0 || delta_grid_spacing[1] == 0) return; // G29 not done!
7906
+      if (delta_grid_spacing[X_AXIS] == 0 || delta_grid_spacing[Y_AXIS] == 0) return; // G29 not done!
7879
 
7907
 
7880
       int half = (AUTO_BED_LEVELING_GRID_POINTS - 1) / 2;
7908
       int half = (AUTO_BED_LEVELING_GRID_POINTS - 1) / 2;
7881
       float h1 = 0.001 - half, h2 = half - 0.001,
7909
       float h1 = 0.001 - half, h2 = half - 0.001,
7882
-            grid_x = max(h1, min(h2, RAW_X_POSITION(cartesian[X_AXIS]) / delta_grid_spacing[0])),
7883
-            grid_y = max(h1, min(h2, RAW_Y_POSITION(cartesian[Y_AXIS]) / delta_grid_spacing[1]));
7910
+            grid_x = max(h1, min(h2, RAW_X_POSITION(cartesian[X_AXIS]) / delta_grid_spacing[X_AXIS])),
7911
+            grid_y = max(h1, min(h2, RAW_Y_POSITION(cartesian[Y_AXIS]) / delta_grid_spacing[Y_AXIS]));
7884
       int floor_x = floor(grid_x), floor_y = floor(grid_y);
7912
       int floor_x = floor(grid_x), floor_y = floor(grid_y);
7885
       float ratio_x = grid_x - floor_x, ratio_y = grid_y - floor_y,
7913
       float ratio_x = grid_x - floor_x, ratio_y = grid_y - floor_y,
7886
             z1 = bed_level[floor_x + half][floor_y + half],
7914
             z1 = bed_level[floor_x + half][floor_y + half],

+ 7
- 0
Marlin/SanityCheck.h View File

191
   #if DISABLED(USE_XMAX_PLUG) && DISABLED(USE_YMAX_PLUG) && DISABLED(USE_ZMAX_PLUG)
191
   #if DISABLED(USE_XMAX_PLUG) && DISABLED(USE_YMAX_PLUG) && DISABLED(USE_ZMAX_PLUG)
192
     #error "You probably want to use Max Endstops for DELTA!"
192
     #error "You probably want to use Max Endstops for DELTA!"
193
   #endif
193
   #endif
194
+  #if ENABLED(AUTO_BED_LEVELING_GRID)
195
+    #if (AUTO_BED_LEVELING_GRID_POINTS & 1) == 0
196
+      #error "DELTA requires an odd value for AUTO_BED_LEVELING_GRID_POINTS."
197
+    #elif AUTO_BED_LEVELING_GRID_POINTS < 3
198
+      #error "DELTA requires at least 3 AUTO_BED_LEVELING_GRID_POINTS."
199
+    #endif
200
+  #endif
194
 #endif
201
 #endif
195
 
202
 
196
 /**
203
 /**

+ 3
- 0
Marlin/configuration_store.cpp View File

186
   #endif
186
   #endif
187
 
187
 
188
   calculate_volumetric_multipliers();
188
   calculate_volumetric_multipliers();
189
+
190
+  // Software endstops depend on home_offset
191
+  LOOP_XYZ(i) update_software_endstops((AxisEnum)i);
189
 }
192
 }
190
 
193
 
191
 #if ENABLED(EEPROM_SETTINGS)
194
 #if ENABLED(EEPROM_SETTINGS)

+ 1
- 1
Marlin/example_configurations/Cartesio/Configuration.h View File

689
 
689
 
690
     // Set the number of grid points per dimension.
690
     // Set the number of grid points per dimension.
691
     // You probably don't need more than 3 (squared=9).
691
     // You probably don't need more than 3 (squared=9).
692
-    #define AUTO_BED_LEVELING_GRID_POINTS 2
692
+    #define AUTO_BED_LEVELING_GRID_POINTS 3
693
 
693
 
694
   #else  // !AUTO_BED_LEVELING_GRID
694
   #else  // !AUTO_BED_LEVELING_GRID
695
 
695
 

+ 1
- 1
Marlin/example_configurations/Felix/Configuration.h View File

671
 
671
 
672
     // Set the number of grid points per dimension.
672
     // Set the number of grid points per dimension.
673
     // You probably don't need more than 3 (squared=9).
673
     // You probably don't need more than 3 (squared=9).
674
-    #define AUTO_BED_LEVELING_GRID_POINTS 2
674
+    #define AUTO_BED_LEVELING_GRID_POINTS 3
675
 
675
 
676
   #else  // !AUTO_BED_LEVELING_GRID
676
   #else  // !AUTO_BED_LEVELING_GRID
677
 
677
 

+ 1
- 1
Marlin/example_configurations/Felix/DUAL/Configuration.h View File

669
 
669
 
670
     // Set the number of grid points per dimension.
670
     // Set the number of grid points per dimension.
671
     // You probably don't need more than 3 (squared=9).
671
     // You probably don't need more than 3 (squared=9).
672
-    #define AUTO_BED_LEVELING_GRID_POINTS 2
672
+    #define AUTO_BED_LEVELING_GRID_POINTS 3
673
 
673
 
674
   #else  // !AUTO_BED_LEVELING_GRID
674
   #else  // !AUTO_BED_LEVELING_GRID
675
 
675
 

+ 1
- 1
Marlin/example_configurations/Hephestos/Configuration.h View File

681
 
681
 
682
     // Set the number of grid points per dimension.
682
     // Set the number of grid points per dimension.
683
     // You probably don't need more than 3 (squared=9).
683
     // You probably don't need more than 3 (squared=9).
684
-    #define AUTO_BED_LEVELING_GRID_POINTS 2
684
+    #define AUTO_BED_LEVELING_GRID_POINTS 3
685
 
685
 
686
   #else  // !AUTO_BED_LEVELING_GRID
686
   #else  // !AUTO_BED_LEVELING_GRID
687
 
687
 

+ 1
- 1
Marlin/example_configurations/Hephestos_2/Configuration.h View File

683
 
683
 
684
     // Set the number of grid points per dimension.
684
     // Set the number of grid points per dimension.
685
     // You probably don't need more than 3 (squared=9).
685
     // You probably don't need more than 3 (squared=9).
686
-    #define AUTO_BED_LEVELING_GRID_POINTS 2
686
+    #define AUTO_BED_LEVELING_GRID_POINTS 3
687
 
687
 
688
   #else  // !AUTO_BED_LEVELING_GRID
688
   #else  // !AUTO_BED_LEVELING_GRID
689
 
689
 

+ 1
- 1
Marlin/example_configurations/K8200/Configuration.h View File

706
 
706
 
707
     // Set the number of grid points per dimension.
707
     // Set the number of grid points per dimension.
708
     // You probably don't need more than 3 (squared=9).
708
     // You probably don't need more than 3 (squared=9).
709
-    #define AUTO_BED_LEVELING_GRID_POINTS 2
709
+    #define AUTO_BED_LEVELING_GRID_POINTS 3
710
 
710
 
711
   #else  // !AUTO_BED_LEVELING_GRID
711
   #else  // !AUTO_BED_LEVELING_GRID
712
 
712
 

+ 1
- 1
Marlin/example_configurations/K8400/Configuration.h View File

689
 
689
 
690
     // Set the number of grid points per dimension.
690
     // Set the number of grid points per dimension.
691
     // You probably don't need more than 3 (squared=9).
691
     // You probably don't need more than 3 (squared=9).
692
-    #define AUTO_BED_LEVELING_GRID_POINTS 2
692
+    #define AUTO_BED_LEVELING_GRID_POINTS 3
693
 
693
 
694
   #else  // !AUTO_BED_LEVELING_GRID
694
   #else  // !AUTO_BED_LEVELING_GRID
695
 
695
 

+ 1
- 1
Marlin/example_configurations/K8400/Dual-head/Configuration.h View File

689
 
689
 
690
     // Set the number of grid points per dimension.
690
     // Set the number of grid points per dimension.
691
     // You probably don't need more than 3 (squared=9).
691
     // You probably don't need more than 3 (squared=9).
692
-    #define AUTO_BED_LEVELING_GRID_POINTS 2
692
+    #define AUTO_BED_LEVELING_GRID_POINTS 3
693
 
693
 
694
   #else  // !AUTO_BED_LEVELING_GRID
694
   #else  // !AUTO_BED_LEVELING_GRID
695
 
695
 

+ 1
- 1
Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h View File

689
 
689
 
690
     // Set the number of grid points per dimension.
690
     // Set the number of grid points per dimension.
691
     // You probably don't need more than 3 (squared=9).
691
     // You probably don't need more than 3 (squared=9).
692
-    #define AUTO_BED_LEVELING_GRID_POINTS 2
692
+    #define AUTO_BED_LEVELING_GRID_POINTS 3
693
 
693
 
694
   #else  // !AUTO_BED_LEVELING_GRID
694
   #else  // !AUTO_BED_LEVELING_GRID
695
 
695
 

+ 1
- 1
Marlin/example_configurations/RigidBot/Configuration.h View File

686
 
686
 
687
     // Set the number of grid points per dimension.
687
     // Set the number of grid points per dimension.
688
     // You probably don't need more than 3 (squared=9).
688
     // You probably don't need more than 3 (squared=9).
689
-    #define AUTO_BED_LEVELING_GRID_POINTS 2
689
+    #define AUTO_BED_LEVELING_GRID_POINTS 3
690
 
690
 
691
   #else  // !AUTO_BED_LEVELING_GRID
691
   #else  // !AUTO_BED_LEVELING_GRID
692
 
692
 

+ 1
- 1
Marlin/example_configurations/SCARA/Configuration.h View File

697
 
697
 
698
     // Set the number of grid points per dimension.
698
     // Set the number of grid points per dimension.
699
     // You probably don't need more than 3 (squared=9).
699
     // You probably don't need more than 3 (squared=9).
700
-    #define AUTO_BED_LEVELING_GRID_POINTS 2
700
+    #define AUTO_BED_LEVELING_GRID_POINTS 3
701
 
701
 
702
   #else  // !AUTO_BED_LEVELING_GRID
702
   #else  // !AUTO_BED_LEVELING_GRID
703
 
703
 

+ 1
- 1
Marlin/example_configurations/TAZ4/Configuration.h View File

710
 
710
 
711
     // Set the number of grid points per dimension.
711
     // Set the number of grid points per dimension.
712
     // You probably don't need more than 3 (squared=9).
712
     // You probably don't need more than 3 (squared=9).
713
-    #define AUTO_BED_LEVELING_GRID_POINTS 2
713
+    #define AUTO_BED_LEVELING_GRID_POINTS 3
714
 
714
 
715
   #else  // !AUTO_BED_LEVELING_GRID
715
   #else  // !AUTO_BED_LEVELING_GRID
716
 
716
 

+ 1
- 1
Marlin/example_configurations/WITBOX/Configuration.h View File

681
 
681
 
682
     // Set the number of grid points per dimension.
682
     // Set the number of grid points per dimension.
683
     // You probably don't need more than 3 (squared=9).
683
     // You probably don't need more than 3 (squared=9).
684
-    #define AUTO_BED_LEVELING_GRID_POINTS 2
684
+    #define AUTO_BED_LEVELING_GRID_POINTS 3
685
 
685
 
686
   #else  // !AUTO_BED_LEVELING_GRID
686
   #else  // !AUTO_BED_LEVELING_GRID
687
 
687
 

+ 1
- 1
Marlin/example_configurations/adafruit/ST7565/Configuration.h View File

689
 
689
 
690
     // Set the number of grid points per dimension.
690
     // Set the number of grid points per dimension.
691
     // You probably don't need more than 3 (squared=9).
691
     // You probably don't need more than 3 (squared=9).
692
-    #define AUTO_BED_LEVELING_GRID_POINTS 2
692
+    #define AUTO_BED_LEVELING_GRID_POINTS 3
693
 
693
 
694
   #else  // !AUTO_BED_LEVELING_GRID
694
   #else  // !AUTO_BED_LEVELING_GRID
695
 
695
 

+ 1
- 1
Marlin/example_configurations/makibox/Configuration.h View File

692
 
692
 
693
     // Set the number of grid points per dimension.
693
     // Set the number of grid points per dimension.
694
     // You probably don't need more than 3 (squared=9).
694
     // You probably don't need more than 3 (squared=9).
695
-    #define AUTO_BED_LEVELING_GRID_POINTS 2
695
+    #define AUTO_BED_LEVELING_GRID_POINTS 3
696
 
696
 
697
   #else  // !AUTO_BED_LEVELING_GRID
697
   #else  // !AUTO_BED_LEVELING_GRID
698
 
698
 

+ 1
- 1
Marlin/example_configurations/tvrrug/Round2/Configuration.h View File

679
 
679
 
680
     // Set the number of grid points per dimension.
680
     // Set the number of grid points per dimension.
681
     // You probably don't need more than 3 (squared=9).
681
     // You probably don't need more than 3 (squared=9).
682
-    #define AUTO_BED_LEVELING_GRID_POINTS 2
682
+    #define AUTO_BED_LEVELING_GRID_POINTS 3
683
 
683
 
684
   #else  // !AUTO_BED_LEVELING_GRID
684
   #else  // !AUTO_BED_LEVELING_GRID
685
 
685
 

Loading…
Cancel
Save