ソースを参照

⚡️ Simplify PROBING_STEPPERS_OFF (#22581)

Jason Smith 3年前
コミット
c05de6cbf8
コミッターのメールアドレスに関連付けられたアカウントが存在しません
2個のファイルの変更10行の追加16行の削除
  1. 3
    4
      Marlin/src/inc/Conditionals_post.h
  2. 7
    12
      Marlin/src/module/probe.cpp

+ 3
- 4
Marlin/src/inc/Conditionals_post.h ファイルの表示

@@ -2932,10 +2932,9 @@
2932 2932
 #endif
2933 2933
 #if !BOTH(HAS_BED_PROBE, HAS_EXTRUDERS)
2934 2934
   #undef PROBING_ESTEPPERS_OFF
2935
-#endif
2936
-#if BOTH(PROBING_STEPPERS_OFF, PROBING_ESTEPPERS_OFF)
2937
-  #undef PROBING_ESTEPPERS_OFF
2938
-  #warning "PROBING_STEPPERS_OFF includes PROBING_ESTEPPERS_OFF. Disabling PROBING_ESTEPPERS_OFF."
2935
+#elif ENABLED(PROBING_STEPPERS_OFF)
2936
+  // PROBING_STEPPERS_OFF implies PROBING_ESTEPPERS_OFF, make sure it is defined
2937
+  #define PROBING_ESTEPPERS_OFF
2939 2938
 #endif
2940 2939
 #if EITHER(ADVANCED_PAUSE_FEATURE, PROBING_HEATERS_OFF)
2941 2940
   #define HEATER_IDLE_HANDLER 1

+ 7
- 12
Marlin/src/module/probe.cpp ファイルの表示

@@ -250,21 +250,16 @@ xyz_pos_t Probe::offset; // Initialized by settings.load()
250 250
     TERN_(PROBING_HEATERS_OFF, thermalManager.pause_heaters(dopause));
251 251
     TERN_(PROBING_FANS_OFF, thermalManager.set_fans_paused(dopause));
252 252
     TERN_(PROBING_ESTEPPERS_OFF, if (dopause) disable_e_steppers());
253
-    #if ENABLED(PROBING_STEPPERS_OFF)
254
-      IF_DISABLED(DELTA, static uint8_t old_trusted);
253
+    #if ENABLED(PROBING_STEPPERS_OFF) && DISABLED(DELTA)
254
+      static uint8_t old_trusted;
255 255
       if (dopause) {
256
-        #if DISABLED(DELTA)
257
-          old_trusted = axis_trusted;
258
-          DISABLE_AXIS_X();
259
-          DISABLE_AXIS_Y();
260
-        #endif
261
-        IF_DISABLED(PROBING_ESTEPPERS_OFF, disable_e_steppers());
256
+        old_trusted = axis_trusted;
257
+        DISABLE_AXIS_X();
258
+        DISABLE_AXIS_Y();
262 259
       }
263 260
       else {
264
-        #if DISABLED(DELTA)
265
-          if (TEST(old_trusted, X_AXIS)) ENABLE_AXIS_X();
266
-          if (TEST(old_trusted, Y_AXIS)) ENABLE_AXIS_Y();
267
-        #endif
261
+        if (TEST(old_trusted, X_AXIS)) ENABLE_AXIS_X();
262
+        if (TEST(old_trusted, Y_AXIS)) ENABLE_AXIS_Y();
268 263
         axis_trusted = old_trusted;
269 264
       }
270 265
     #endif

読み込み中…
キャンセル
保存