Browse Source

Simple bool in soft_endstops_t

Scott Lahteine 3 years ago
parent
commit
2a2666326b
2 changed files with 5 additions and 7 deletions
  1. 2
    2
      Marlin/src/module/motion.cpp
  2. 3
    5
      Marlin/src/module/motion.h

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

@@ -536,9 +536,9 @@ void restore_feedrate_and_scaling() {
536 536
 
537 537
   // Software Endstops are based on the configured limits.
538 538
   soft_endstops_t soft_endstop = {
539
+    true, false,
539 540
     { X_MIN_POS, Y_MIN_POS, Z_MIN_POS },
540
-    { X_MAX_POS, Y_MAX_POS, Z_MAX_POS },
541
-    { true, false }
541
+    { X_MAX_POS, Y_MAX_POS, Z_MAX_POS }
542 542
   };
543 543
 
544 544
   /**

+ 3
- 5
Marlin/src/module/motion.h View File

@@ -151,12 +151,10 @@ inline float home_bump_mm(const AxisEnum axis) {
151 151
 #if HAS_SOFTWARE_ENDSTOPS
152 152
 
153 153
   typedef struct {
154
-    xyz_pos_t min, max;
155
-    struct {
156
-      bool _enabled:1;
157
-      bool _loose:1;
158
-    };
154
+    bool _enabled, _loose;
159 155
     bool enabled() { return _enabled && !_loose; }
156
+
157
+    xyz_pos_t min, max;
160 158
     void get_manual_axis_limits(const AxisEnum axis, float &amin, float &amax) {
161 159
       amin = -100000; amax = 100000; // "No limits"
162 160
       #if HAS_SOFTWARE_ENDSTOPS

Loading…
Cancel
Save