|
@@ -322,6 +322,9 @@ float home_offset[3] = { 0 };
|
322
|
322
|
// Software Endstops. Default to configured limits.
|
323
|
323
|
float sw_endstop_min[3] = { X_MIN_POS, Y_MIN_POS, Z_MIN_POS };
|
324
|
324
|
float sw_endstop_max[3] = { X_MAX_POS, Y_MAX_POS, Z_MAX_POS };
|
|
325
|
+#if ENABLED(DELTA)
|
|
326
|
+ float delta_clip_start_height = Z_MAX_POS;
|
|
327
|
+#endif
|
325
|
328
|
|
326
|
329
|
#if FAN_COUNT > 0
|
327
|
330
|
int fanSpeeds[FAN_COUNT] = { 0 };
|
|
@@ -1441,6 +1444,7 @@ static void update_software_endstops(AxisEnum axis) {
|
1441
|
1444
|
sw_endstop_min[axis] = base_min_pos(axis) + offs;
|
1442
|
1445
|
sw_endstop_max[axis] = base_max_pos(axis) + offs;
|
1443
|
1446
|
}
|
|
1447
|
+
|
1444
|
1448
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
1445
|
1449
|
if (DEBUGGING(LEVELING)) {
|
1446
|
1450
|
SERIAL_ECHOPAIR("For ", axis_codes[axis]);
|
|
@@ -1451,6 +1455,13 @@ static void update_software_endstops(AxisEnum axis) {
|
1451
|
1455
|
SERIAL_EOL;
|
1452
|
1456
|
}
|
1453
|
1457
|
#endif
|
|
1458
|
+
|
|
1459
|
+ #if ENABLED(DELTA)
|
|
1460
|
+ if (axis == Z_AXIS) {
|
|
1461
|
+ delta_clip_start_height = sw_endstop_max[axis] - delta_safe_distance_from_top();
|
|
1462
|
+ }
|
|
1463
|
+ #endif
|
|
1464
|
+
|
1454
|
1465
|
}
|
1455
|
1466
|
|
1456
|
1467
|
/**
|
|
@@ -3101,6 +3112,11 @@ inline void gcode_G28() {
|
3101
|
3112
|
}
|
3102
|
3113
|
#endif
|
3103
|
3114
|
|
|
3115
|
+ #if ENABLED(DELTA)
|
|
3116
|
+ // move to a height where we can use the full xy-area
|
|
3117
|
+ do_blocking_move_to_z(delta_clip_start_height);
|
|
3118
|
+ #endif
|
|
3119
|
+
|
3104
|
3120
|
clean_up_after_endstop_or_probe_move();
|
3105
|
3121
|
|
3106
|
3122
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
|
@@ -7541,6 +7557,15 @@ void clamp_to_software_endstops(float target[3]) {
|
7541
|
7557
|
*/
|
7542
|
7558
|
}
|
7543
|
7559
|
|
|
7560
|
+ float delta_safe_distance_from_top() {
|
|
7561
|
+ float cartesian[3] = { 0 };
|
|
7562
|
+ calculate_delta(cartesian);
|
|
7563
|
+ float distance = delta[TOWER_3];
|
|
7564
|
+ cartesian[Y_AXIS] = DELTA_PRINTABLE_RADIUS;
|
|
7565
|
+ calculate_delta(cartesian);
|
|
7566
|
+ return abs(distance - delta[TOWER_3]);
|
|
7567
|
+ }
|
|
7568
|
+
|
7544
|
7569
|
#if ENABLED(AUTO_BED_LEVELING_FEATURE)
|
7545
|
7570
|
|
7546
|
7571
|
// Adjust print surface height by linear interpolation over the bed_level array.
|