|
@@ -33,20 +33,6 @@
|
33
|
33
|
|
34
|
34
|
#include "Marlin.h"
|
35
|
35
|
|
36
|
|
-#if HAS_ABL
|
37
|
|
- #include "vector_3.h"
|
38
|
|
-#endif
|
39
|
|
-
|
40
|
|
-#if ENABLED(AUTO_BED_LEVELING_LINEAR)
|
41
|
|
- #include "qr_solve.h"
|
42
|
|
-#elif ENABLED(MESH_BED_LEVELING)
|
43
|
|
- #include "mesh_bed_leveling.h"
|
44
|
|
-#endif
|
45
|
|
-
|
46
|
|
-#if ENABLED(BEZIER_CURVE_SUPPORT)
|
47
|
|
- #include "planner_bezier.h"
|
48
|
|
-#endif
|
49
|
|
-
|
50
|
36
|
#include "ultralcd.h"
|
51
|
37
|
#include "planner.h"
|
52
|
38
|
#include "stepper.h"
|
|
@@ -61,6 +47,23 @@
|
61
|
47
|
#include "duration_t.h"
|
62
|
48
|
#include "types.h"
|
63
|
49
|
|
|
50
|
+#if HAS_ABL
|
|
51
|
+ #include "vector_3.h"
|
|
52
|
+ #if ENABLED(AUTO_BED_LEVELING_LINEAR)
|
|
53
|
+ #include "qr_solve.h"
|
|
54
|
+ #endif
|
|
55
|
+#elif ENABLED(MESH_BED_LEVELING)
|
|
56
|
+ #include "mesh_bed_leveling.h"
|
|
57
|
+#endif
|
|
58
|
+
|
|
59
|
+#if ENABLED(BEZIER_CURVE_SUPPORT)
|
|
60
|
+ #include "planner_bezier.h"
|
|
61
|
+#endif
|
|
62
|
+
|
|
63
|
+#if HAS_BUZZER && DISABLED(LCD_USE_I2C_BUZZER)
|
|
64
|
+ #include "buzzer.h"
|
|
65
|
+#endif
|
|
66
|
+
|
64
|
67
|
#if ENABLED(USE_WATCHDOG)
|
65
|
68
|
#include "watchdog.h"
|
66
|
69
|
#endif
|
|
@@ -457,13 +460,17 @@ static uint8_t target_extruder;
|
457
|
460
|
#endif
|
458
|
461
|
|
459
|
462
|
#if ENABLED(AUTO_BED_LEVELING_BILINEAR)
|
460
|
|
- #define ADJUST_DELTA(V) \
|
461
|
|
- if (planner.abl_enabled) { \
|
462
|
|
- const float zadj = bilinear_z_offset(V); \
|
463
|
|
- delta[A_AXIS] += zadj; \
|
464
|
|
- delta[B_AXIS] += zadj; \
|
465
|
|
- delta[C_AXIS] += zadj; \
|
466
|
|
- }
|
|
463
|
+ #if ENABLED(DELTA)
|
|
464
|
+ #define ADJUST_DELTA(V) \
|
|
465
|
+ if (planner.abl_enabled) { \
|
|
466
|
+ const float zadj = bilinear_z_offset(V); \
|
|
467
|
+ delta[A_AXIS] += zadj; \
|
|
468
|
+ delta[B_AXIS] += zadj; \
|
|
469
|
+ delta[C_AXIS] += zadj; \
|
|
470
|
+ }
|
|
471
|
+ #else
|
|
472
|
+ #define ADJUST_DELTA(V) if (planner.abl_enabled) { delta[Z_AXIS] += bilinear_z_offset(V); }
|
|
473
|
+ #endif
|
467
|
474
|
#elif IS_KINEMATIC
|
468
|
475
|
#define ADJUST_DELTA(V) NOOP
|
469
|
476
|
#endif
|
|
@@ -2218,8 +2225,8 @@ static void clean_up_after_endstop_or_probe_move() {
|
2218
|
2225
|
#elif HAS_ABL
|
2219
|
2226
|
|
2220
|
2227
|
if (enable != planner.abl_enabled) {
|
2221
|
|
- planner.abl_enabled = !planner.abl_enabled;
|
2222
|
|
- if (!planner.abl_enabled)
|
|
2228
|
+ planner.abl_enabled = enable;
|
|
2229
|
+ if (!enable)
|
2223
|
2230
|
set_current_from_steppers_for_axis(
|
2224
|
2231
|
#if ABL_PLANAR
|
2225
|
2232
|
ALL_AXES
|
|
@@ -4560,7 +4567,9 @@ inline void gcode_M31() {
|
4560
|
4567
|
SERIAL_ECHO_START;
|
4561
|
4568
|
SERIAL_ECHOLNPAIR("Print time: ", buffer);
|
4562
|
4569
|
|
4563
|
|
- thermalManager.autotempShutdown();
|
|
4570
|
+ #if ENABLED(AUTOTEMP)
|
|
4571
|
+ thermalManager.autotempShutdown();
|
|
4572
|
+ #endif
|
4564
|
4573
|
}
|
4565
|
4574
|
|
4566
|
4575
|
#if ENABLED(SDSUPPORT)
|
|
@@ -8814,9 +8823,7 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) {
|
8814
|
8823
|
// For non-interpolated delta calculate every segment
|
8815
|
8824
|
for (uint16_t s = segments + 1; --s;) {
|
8816
|
8825
|
DELTA_NEXT(segment_distance[i]);
|
8817
|
|
- DELTA_IK();
|
8818
|
|
- ADJUST_DELTA(DELTA_VAR);
|
8819
|
|
- planner.buffer_line(delta[A_AXIS], delta[B_AXIS], delta[C_AXIS], DELTA_VAR[E_AXIS], _feedrate_mm_s, active_extruder);
|
|
8826
|
+ planner.buffer_line_kinematic(DELTA_VAR, _feedrate_mm_s, active_extruder);
|
8820
|
8827
|
}
|
8821
|
8828
|
|
8822
|
8829
|
#endif
|