Browse Source

Apply misc TERN

Scott Lahteine 5 years ago
parent
commit
7628895ac8
2 changed files with 3 additions and 10 deletions
  1. 2
    5
      Marlin/src/gcode/calibrate/G28.cpp
  2. 1
    5
      Marlin/src/module/temperature.cpp

+ 2
- 5
Marlin/src/gcode/calibrate/G28.cpp View File

369
 
369
 
370
       if (doZ) {
370
       if (doZ) {
371
         TERN_(BLTOUCH, bltouch.init());
371
         TERN_(BLTOUCH, bltouch.init());
372
-        #if ENABLED(Z_SAFE_HOMING)
373
-          home_z_safely();
374
-        #else
375
-          homeaxis(Z_AXIS);
376
-        #endif
372
+
373
+        TERN(Z_SAFE_HOMING, home_z_safely(), homeaxis(Z_AXIS));
377
 
374
 
378
         #if HOMING_Z_WITH_PROBE && defined(Z_AFTER_PROBING)
375
         #if HOMING_Z_WITH_PROBE && defined(Z_AFTER_PROBING)
379
           #if Z_AFTER_HOMING > Z_AFTER_PROBING
376
           #if Z_AFTER_HOMING > Z_AFTER_PROBING

+ 1
- 5
Marlin/src/module/temperature.cpp View File

900
 
900
 
901
     #else // No PID enabled
901
     #else // No PID enabled
902
 
902
 
903
-      #if HEATER_IDLE_HANDLER
904
-        const bool is_idling = hotend_idle[ee].timed_out;
905
-      #else
906
-        constexpr bool is_idling = false;
907
-      #endif
903
+      const bool is_idling = TERN0(HEATER_IDLE_HANDLER, hotend_idle[ee].timed_out);
908
       const float pid_output = (!is_idling && temp_hotend[ee].celsius < temp_hotend[ee].target) ? BANG_MAX : 0;
904
       const float pid_output = (!is_idling && temp_hotend[ee].celsius < temp_hotend[ee].target) ? BANG_MAX : 0;
909
 
905
 
910
     #endif
906
     #endif

Loading…
Cancel
Save