Bladeren bron

Add HAS_EXTRA_ENDSTOPS macro

Scott Lahteine 6 jaren geleden
bovenliggende
commit
1bd9a63049

+ 1
- 1
Marlin/src/config/examples/delta/Geeetech/Rostock 301/Configuration.h Bestand weergeven

641
 #define X_MAX_ENDSTOP_INVERTING false  // set to true to invert the logic of the endstop.
641
 #define X_MAX_ENDSTOP_INVERTING false  // set to true to invert the logic of the endstop.
642
 #define Y_MAX_ENDSTOP_INVERTING false  // set to true to invert the logic of the endstop.
642
 #define Y_MAX_ENDSTOP_INVERTING false  // set to true to invert the logic of the endstop.
643
 #define Z_MAX_ENDSTOP_INVERTING false  // set to true to invert the logic of the endstop.
643
 #define Z_MAX_ENDSTOP_INVERTING false  // set to true to invert the logic of the endstop.
644
-#define Z_MIN_PROBE_ENDSTOP_INVERTING false  // set to true to invert the logic of the probe.
644
+#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
645
 
645
 
646
 /**
646
 /**
647
  * Stepper Drivers
647
  * Stepper Drivers

+ 4
- 4
Marlin/src/gcode/calibrate/M666.cpp Bestand weergeven

22
 
22
 
23
 #include "../../inc/MarlinConfig.h"
23
 #include "../../inc/MarlinConfig.h"
24
 
24
 
25
-#if ENABLED(DELTA) || ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || Z_MULTI_ENDSTOPS
25
+#if ENABLED(DELTA) || HAS_EXTRA_ENDSTOPS
26
 
26
 
27
 #include "../gcode.h"
27
 #include "../gcode.h"
28
 
28
 
59
     #endif
59
     #endif
60
   }
60
   }
61
 
61
 
62
-#elif ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || Z_MULTI_ENDSTOPS
62
+#elif HAS_EXTRA_ENDSTOPS
63
 
63
 
64
   #include "../../module/endstops.h"
64
   #include "../../module/endstops.h"
65
 
65
 
107
     }
107
     }
108
   }
108
   }
109
 
109
 
110
-#endif // X_DUAL_ENDSTOPS || Y_DUAL_ENDSTOPS || Z_DUAL_ENDSTOPS
110
+#endif // HAS_EXTRA_ENDSTOPS
111
 
111
 
112
-#endif // DELTA || X_DUAL_ENDSTOPS || Y_DUAL_ENDSTOPS || Z_DUAL_ENDSTOPS
112
+#endif // DELTA || HAS_EXTRA_ENDSTOPS

+ 1
- 1
Marlin/src/gcode/gcode.h Bestand weergeven

759
     static void M665();
759
     static void M665();
760
   #endif
760
   #endif
761
 
761
 
762
-  #if ENABLED(DELTA) || ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || Z_MULTI_ENDSTOPS
762
+  #if ENABLED(DELTA) || HAS_EXTRA_ENDSTOPS
763
     static void M666();
763
     static void M666();
764
   #endif
764
   #endif
765
 
765
 

+ 1
- 1
Marlin/src/gcode/queue.cpp Bestand weergeven

635
           gcode_LastN = gcode_N;
635
           gcode_LastN = gcode_N;
636
         }
636
         }
637
         #if ENABLED(SDSUPPORT)
637
         #if ENABLED(SDSUPPORT)
638
-          // Pronterface "M29" and "M29 " has no line number 
638
+          // Pronterface "M29" and "M29 " has no line number
639
           else if (card.flag.saving && !is_M29(command))
639
           else if (card.flag.saving && !is_M29(command))
640
             return gcode_line_error(PSTR(MSG_ERR_NO_CHECKSUM), i);
640
             return gcode_line_error(PSTR(MSG_ERR_NO_CHECKSUM), i);
641
         #endif
641
         #endif

+ 1
- 0
Marlin/src/inc/Conditionals_LCD.h Bestand weergeven

529
 
529
 
530
 #define Z_MULTI_STEPPER_DRIVERS (ENABLED(Z_DUAL_STEPPER_DRIVERS) || ENABLED(Z_TRIPLE_STEPPER_DRIVERS))
530
 #define Z_MULTI_STEPPER_DRIVERS (ENABLED(Z_DUAL_STEPPER_DRIVERS) || ENABLED(Z_TRIPLE_STEPPER_DRIVERS))
531
 #define Z_MULTI_ENDSTOPS (ENABLED(Z_DUAL_ENDSTOPS) || ENABLED(Z_TRIPLE_ENDSTOPS))
531
 #define Z_MULTI_ENDSTOPS (ENABLED(Z_DUAL_ENDSTOPS) || ENABLED(Z_TRIPLE_ENDSTOPS))
532
+#define HAS_EXTRA_ENDSTOPS (ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || Z_MULTI_ENDSTOPS)
532
 
533
 
533
 #define IS_SCARA     (ENABLED(MORGAN_SCARA) || ENABLED(MAKERARM_SCARA))
534
 #define IS_SCARA     (ENABLED(MORGAN_SCARA) || ENABLED(MAKERARM_SCARA))
534
 #define IS_KINEMATIC (ENABLED(DELTA) || IS_SCARA)
535
 #define IS_KINEMATIC (ENABLED(DELTA) || IS_SCARA)

+ 1
- 1
Marlin/src/module/endstops.h Bestand weergeven

50
 
50
 
51
   public:
51
   public:
52
 
52
 
53
-    #if ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || Z_MULTI_ENDSTOPS
53
+    #if HAS_EXTRA_ENDSTOPS
54
       typedef uint16_t esbits_t;
54
       typedef uint16_t esbits_t;
55
       #if ENABLED(X_DUAL_ENDSTOPS)
55
       #if ENABLED(X_DUAL_ENDSTOPS)
56
         static float x2_endstop_adj;
56
         static float x2_endstop_adj;

+ 2
- 2
Marlin/src/module/motion.cpp Bestand weergeven

1421
   #endif
1421
   #endif
1422
 
1422
 
1423
   // Set flags for X, Y, Z motor locking
1423
   // Set flags for X, Y, Z motor locking
1424
-  #if ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || Z_MULTI_ENDSTOPS
1424
+  #if HAS_EXTRA_ENDSTOPS
1425
     switch (axis) {
1425
     switch (axis) {
1426
       #if ENABLED(X_DUAL_ENDSTOPS)
1426
       #if ENABLED(X_DUAL_ENDSTOPS)
1427
         case X_AXIS:
1427
         case X_AXIS:
1499
     #endif
1499
     #endif
1500
   }
1500
   }
1501
 
1501
 
1502
-  #if ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || Z_MULTI_ENDSTOPS
1502
+  #if HAS_EXTRA_ENDSTOPS
1503
     const bool pos_dir = axis_home_dir > 0;
1503
     const bool pos_dir = axis_home_dir > 0;
1504
     #if ENABLED(X_DUAL_ENDSTOPS)
1504
     #if ENABLED(X_DUAL_ENDSTOPS)
1505
       if (axis == X_AXIS) {
1505
       if (axis == X_AXIS) {

+ 1
- 1
Marlin/src/module/stepper.cpp Bestand weergeven

119
 
119
 
120
 // public:
120
 // public:
121
 
121
 
122
-#if ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || Z_MULTI_ENDSTOPS || ENABLED(Z_STEPPER_AUTO_ALIGN)
122
+#if HAS_EXTRA_ENDSTOPS || ENABLED(Z_STEPPER_AUTO_ALIGN)
123
   bool Stepper::separate_multi_axis = false;
123
   bool Stepper::separate_multi_axis = false;
124
 #endif
124
 #endif
125
 
125
 

+ 2
- 2
Marlin/src/module/stepper.h Bestand weergeven

230
 
230
 
231
   public:
231
   public:
232
 
232
 
233
-    #if ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || Z_MULTI_ENDSTOPS || ENABLED(Z_STEPPER_AUTO_ALIGN)
233
+    #if HAS_EXTRA_ENDSTOPS || ENABLED(Z_STEPPER_AUTO_ALIGN)
234
       static bool separate_multi_axis;
234
       static bool separate_multi_axis;
235
     #endif
235
     #endif
236
 
236
 
407
       static void microstep_readings();
407
       static void microstep_readings();
408
     #endif
408
     #endif
409
 
409
 
410
-    #if ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || Z_MULTI_ENDSTOPS || ENABLED(Z_STEPPER_AUTO_ALIGN)
410
+    #if HAS_EXTRA_ENDSTOPS || ENABLED(Z_STEPPER_AUTO_ALIGN)
411
       FORCE_INLINE static void set_separate_multi_axis(const bool state) { separate_multi_axis = state; }
411
       FORCE_INLINE static void set_separate_multi_axis(const bool state) { separate_multi_axis = state; }
412
     #endif
412
     #endif
413
     #if ENABLED(X_DUAL_ENDSTOPS)
413
     #if ENABLED(X_DUAL_ENDSTOPS)

Laden…
Annuleren
Opslaan