Tweaks to Z fade behavior
This commit is contained in:
@ -2061,7 +2061,7 @@ void MarlinSettings::postprocess() {
|
||||
}
|
||||
else {
|
||||
ubl.reset();
|
||||
DEBUG_ECHOLNPGM("UBL System reset()");
|
||||
DEBUG_ECHOLNPGM("UBL reset");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -411,15 +411,13 @@ class Planner {
|
||||
*/
|
||||
static inline float fade_scaling_factor_for_z(const float &rz) {
|
||||
static float z_fade_factor = 1;
|
||||
if (z_fade_height) {
|
||||
if (rz >= z_fade_height) return 0;
|
||||
if (last_fade_z != rz) {
|
||||
last_fade_z = rz;
|
||||
z_fade_factor = 1 - rz * inverse_z_fade_height;
|
||||
}
|
||||
return z_fade_factor;
|
||||
if (!z_fade_height) return 1;
|
||||
if (rz >= z_fade_height) return 0;
|
||||
if (last_fade_z != rz) {
|
||||
last_fade_z = rz;
|
||||
z_fade_factor = 1 - rz * inverse_z_fade_height;
|
||||
}
|
||||
return 1;
|
||||
return z_fade_factor;
|
||||
}
|
||||
|
||||
FORCE_INLINE static void force_fade_recalc() { last_fade_z = -999.999f; }
|
||||
|
Reference in New Issue
Block a user