|
@@ -128,13 +128,17 @@ void set_bed_leveling_enabled(const bool enable/*=true*/) {
|
128
|
128
|
// so compensation will give the right stepper counts.
|
129
|
129
|
planner.unapply_leveling(current_position);
|
130
|
130
|
|
|
131
|
+ SYNC_PLAN_POSITION_KINEMATIC();
|
|
132
|
+
|
131
|
133
|
#endif // OLDSCHOOL_ABL
|
132
|
134
|
}
|
133
|
135
|
}
|
134
|
136
|
|
135
|
137
|
#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
|
136
|
138
|
|
137
|
|
- void set_z_fade_height(const float zfh) {
|
|
139
|
+ void set_z_fade_height(const float zfh, const bool do_report/*=true*/) {
|
|
140
|
+
|
|
141
|
+ if (planner.z_fade_height == zfh) return; // do nothing if no change
|
138
|
142
|
|
139
|
143
|
const bool level_active = planner.leveling_active;
|
140
|
144
|
|
|
@@ -145,6 +149,10 @@ void set_bed_leveling_enabled(const bool enable/*=true*/) {
|
145
|
149
|
planner.set_z_fade_height(zfh);
|
146
|
150
|
|
147
|
151
|
if (level_active) {
|
|
152
|
+ const float oldpos[XYZE] = {
|
|
153
|
+ current_position[X_AXIS], current_position[Y_AXIS],
|
|
154
|
+ current_position[Z_AXIS], current_position[E_AXIS]
|
|
155
|
+ };
|
148
|
156
|
#if ENABLED(AUTO_BED_LEVELING_UBL)
|
149
|
157
|
set_bed_leveling_enabled(true); // turn back on after changing fade height
|
150
|
158
|
#else
|
|
@@ -155,7 +163,10 @@ void set_bed_leveling_enabled(const bool enable/*=true*/) {
|
155
|
163
|
Z_AXIS
|
156
|
164
|
#endif
|
157
|
165
|
);
|
|
166
|
+ SYNC_PLAN_POSITION_KINEMATIC();
|
158
|
167
|
#endif
|
|
168
|
+ if (do_report && memcmp(oldpos, current_position, sizeof(oldpos)))
|
|
169
|
+ report_current_position();
|
159
|
170
|
}
|
160
|
171
|
}
|
161
|
172
|
|