Browse Source

Leveling Fade Height default setting (#20316)

Jason Smith 4 years ago
parent
commit
df0a0c9490
No account linked to committer's email address
3 changed files with 9 additions and 2 deletions
  1. 3
    0
      Marlin/Configuration.h
  2. 4
    0
      Marlin/src/inc/Conditionals_post.h
  3. 2
    2
      Marlin/src/module/settings.cpp

+ 3
- 0
Marlin/Configuration.h View File

@@ -1291,6 +1291,9 @@
1291 1291
   // at which point movement will be level to the machine's XY plane.
1292 1292
   // The height can be set with M420 Z<height>
1293 1293
   #define ENABLE_LEVELING_FADE_HEIGHT
1294
+  #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
1295
+    #define DEFAULT_LEVELING_FADE_HEIGHT 10.0 // (mm) Default fade height.
1296
+  #endif
1294 1297
 
1295 1298
   // For Cartesian machines, instead of dividing moves on mesh boundaries,
1296 1299
   // split up moves into short segments like a Delta. This follows the

+ 4
- 0
Marlin/src/inc/Conditionals_post.h View File

@@ -2448,6 +2448,10 @@
2448 2448
   #endif
2449 2449
 #endif
2450 2450
 
2451
+#ifndef DEFAULT_LEVELING_FADE_HEIGHT
2452
+  #define DEFAULT_LEVELING_FADE_HEIGHT 0.0
2453
+#endif
2454
+
2451 2455
 #if ENABLED(SEGMENT_LEVELED_MOVES) && !defined(LEVELED_SEGMENT_LENGTH)
2452 2456
   #define LEVELED_SEGMENT_LENGTH 5
2453 2457
 #endif

+ 2
- 2
Marlin/src/module/settings.cpp View File

@@ -696,7 +696,7 @@ void MarlinSettings::postprocess() {
696 696
     // Global Leveling
697 697
     //
698 698
     {
699
-      const float zfh = TERN(ENABLE_LEVELING_FADE_HEIGHT, planner.z_fade_height, 10.0f);
699
+      const float zfh = TERN(ENABLE_LEVELING_FADE_HEIGHT, planner.z_fade_height, (DEFAULT_LEVELING_FADE_HEIGHT));
700 700
       EEPROM_WRITE(zfh);
701 701
     }
702 702
 
@@ -2588,7 +2588,7 @@ void MarlinSettings::reset() {
2588 2588
   //
2589 2589
   // Global Leveling
2590 2590
   //
2591
-  TERN_(ENABLE_LEVELING_FADE_HEIGHT, new_z_fade_height = 0.0);
2591
+  TERN_(ENABLE_LEVELING_FADE_HEIGHT, new_z_fade_height = (DEFAULT_LEVELING_FADE_HEIGHT));
2592 2592
   TERN_(HAS_LEVELING, reset_bed_level());
2593 2593
 
2594 2594
   #if HAS_BED_PROBE

Loading…
Cancel
Save