Browse Source

Make UBL honor the #define ENABLE_LEVELING_FADE_HEIGHT option

Roxy-3D 8 years ago
parent
commit
5de1da2b3c
1 changed files with 4 additions and 1 deletions
  1. 4
    1
      Marlin/UBL.h

+ 4
- 1
Marlin/UBL.h View File

312
        * or if the current Z Height is past the specified 'Fade Height'
312
        * or if the current Z Height is past the specified 'Fade Height'
313
        */
313
        */
314
       FORCE_INLINE float fade_scaling_factor_for_z(float current_z) {
314
       FORCE_INLINE float fade_scaling_factor_for_z(float current_z) {
315
+      #ifndef ENABLE_LEVELING_FADE_HEIGHT   // if turned off, just return 0.000    Note that we assume the
316
+        return 0.000;                       // compiler will do 'Dead Code' elimination so there is no need
317
+      #endif                                // for an #else clause here.
315
         if (last_specified_z == current_z)
318
         if (last_specified_z == current_z)
316
           return fade_scaling_factor_for_current_height;
319
           return fade_scaling_factor_for_current_height;
317
 
320
 
328
     extern int ubl_eeprom_start;
331
     extern int ubl_eeprom_start;
329
 
332
 
330
 #endif // AUTO_BED_LEVELING_UBL
333
 #endif // AUTO_BED_LEVELING_UBL
331
-#endif // UNIFIED_BED_LEVELING_H
334
+#endif // UNIFIED_BED_LEVELING_H

Loading…
Cancel
Save