1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-27 13:56:24 +00:00

Make UBL honor the #define ENABLE_LEVELING_FADE_HEIGHT option

This commit is contained in:
Roxy-3D 2017-03-23 04:40:53 -05:00 committed by Roxy-3D
parent 8f9face956
commit 5de1da2b3c

View File

@ -312,6 +312,9 @@
* or if the current Z Height is past the specified 'Fade Height' * or if the current Z Height is past the specified 'Fade Height'
*/ */
FORCE_INLINE float fade_scaling_factor_for_z(float current_z) { FORCE_INLINE float fade_scaling_factor_for_z(float current_z) {
#ifndef ENABLE_LEVELING_FADE_HEIGHT // if turned off, just return 0.000 Note that we assume the
return 0.000; // compiler will do 'Dead Code' elimination so there is no need
#endif // for an #else clause here.
if (last_specified_z == current_z) if (last_specified_z == current_z)
return fade_scaling_factor_for_current_height; return fade_scaling_factor_for_current_height;