Selaa lähdekoodia

Apply misc TERN

Scott Lahteine 5 vuotta sitten
vanhempi
commit
7628895ac8
2 muutettua tiedostoa jossa 3 lisäystä ja 10 poistoa
  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 Näytä tiedosto

@@ -369,11 +369,8 @@ void GcodeSuite::G28() {
369 369
 
370 370
       if (doZ) {
371 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 375
         #if HOMING_Z_WITH_PROBE && defined(Z_AFTER_PROBING)
379 376
           #if Z_AFTER_HOMING > Z_AFTER_PROBING

+ 1
- 5
Marlin/src/module/temperature.cpp Näytä tiedosto

@@ -900,11 +900,7 @@ void Temperature::min_temp_error(const heater_ind_t heater) {
900 900
 
901 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 904
       const float pid_output = (!is_idling && temp_hotend[ee].celsius < temp_hotend[ee].target) ? BANG_MAX : 0;
909 905
 
910 906
     #endif

Loading…
Peruuta
Tallenna