|
@@ -202,6 +202,10 @@ class Planner {
|
202
|
202
|
*/
|
203
|
203
|
static uint32_t cutoff_long;
|
204
|
204
|
|
|
205
|
+ #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
|
|
206
|
+ static float last_raw_lz;
|
|
207
|
+ #endif
|
|
208
|
+
|
205
|
209
|
#if ENABLED(DISABLE_INACTIVE_EXTRUDER)
|
206
|
210
|
/**
|
207
|
211
|
* Counters to manage disabling inactive extruders
|
|
@@ -273,7 +277,7 @@ class Planner {
|
273
|
277
|
* Returns 0.0 if Z is past the specified 'Fade Height'.
|
274
|
278
|
*/
|
275
|
279
|
inline static float fade_scaling_factor_for_z(const float &lz) {
|
276
|
|
- static float z_fade_factor = 1.0, last_raw_lz = -999.0;
|
|
280
|
+ static float z_fade_factor = 1.0;
|
277
|
281
|
if (z_fade_height) {
|
278
|
282
|
const float raw_lz = RAW_Z_POSITION(lz);
|
279
|
283
|
if (raw_lz >= z_fade_height) return 0.0;
|
|
@@ -286,6 +290,8 @@ class Planner {
|
286
|
290
|
return 1.0;
|
287
|
291
|
}
|
288
|
292
|
|
|
293
|
+ FORCE_INLINE static void force_fade_recalc() { last_raw_lz = -999.999; }
|
|
294
|
+
|
289
|
295
|
#else
|
290
|
296
|
|
291
|
297
|
FORCE_INLINE static float fade_scaling_factor_for_z(const float &lz) {
|