Skip to content

Commit

Permalink
Simple bool in soft_endstops_t
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Oct 16, 2020
1 parent 3bba5d5 commit 2a26663
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Marlin/src/module/motion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -536,9 +536,9 @@ void restore_feedrate_and_scaling() {

// Software Endstops are based on the configured limits.
soft_endstops_t soft_endstop = {
true, false,
{ X_MIN_POS, Y_MIN_POS, Z_MIN_POS },
{ X_MAX_POS, Y_MAX_POS, Z_MAX_POS },
{ true, false }
{ X_MAX_POS, Y_MAX_POS, Z_MAX_POS }
};

/**
Expand Down
8 changes: 3 additions & 5 deletions Marlin/src/module/motion.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,10 @@ inline float home_bump_mm(const AxisEnum axis) {
#if HAS_SOFTWARE_ENDSTOPS

typedef struct {
xyz_pos_t min, max;
struct {
bool _enabled:1;
bool _loose:1;
};
bool _enabled, _loose;
bool enabled() { return _enabled && !_loose; }

xyz_pos_t min, max;
void get_manual_axis_limits(const AxisEnum axis, float &amin, float &amax) {
amin = -100000; amax = 100000; // "No limits"
#if HAS_SOFTWARE_ENDSTOPS
Expand Down

0 comments on commit 2a26663

Please sign in to comment.