Skip to content

Commit 2a26663

Browse files
committed
Simple bool in soft_endstops_t
1 parent 3bba5d5 commit 2a26663

2 files changed

Lines changed: 5 additions & 7 deletions

File tree

Marlin/src/module/motion.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -536,9 +536,9 @@ void restore_feedrate_and_scaling() {
536536

537537
// Software Endstops are based on the configured limits.
538538
soft_endstops_t soft_endstop = {
539+
true, false,
539540
{ 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 }
542542
};
543543

544544
/**

Marlin/src/module/motion.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -151,12 +151,10 @@ inline float home_bump_mm(const AxisEnum axis) {
151151
#if HAS_SOFTWARE_ENDSTOPS
152152

153153
typedef struct {
154-
xyz_pos_t min, max;
155-
struct {
156-
bool _enabled:1;
157-
bool _loose:1;
158-
};
154+
bool _enabled, _loose;
159155
bool enabled() { return _enabled && !_loose; }
156+
157+
xyz_pos_t min, max;
160158
void get_manual_axis_limits(const AxisEnum axis, float &amin, float &amax) {
161159
amin = -100000; amax = 100000; // "No limits"
162160
#if HAS_SOFTWARE_ENDSTOPS

0 commit comments

Comments
 (0)