Cleanup for dual endstops homing

This commit is contained in:
Scott Lahteine
2018-06-02 20:39:00 -05:00
parent 61181b7f24
commit ad8d3150aa
4 changed files with 58 additions and 62 deletions

View File

@ -396,7 +396,6 @@ void Endstops::M119() {
// Check endstops - Could be called from ISR!
void Endstops::update() {
#define SET_BIT_TO(N,B,TF) do{ if (TF) SBI(N,B); else CBI(N,B); }while(0)
// UPDATE_ENDSTOP_BIT: set the current endstop bits for an endstop to its status
#define UPDATE_ENDSTOP_BIT(AXIS, MINMAX) SET_BIT_TO(live_state, _ENDSTOP(AXIS, MINMAX), (READ(_ENDSTOP_PIN(AXIS, MINMAX)) != _ENDSTOP_INVERTING(AXIS, MINMAX)))
// COPY_BIT: copy the value of SRC_BIT to DST_BIT in DST
@ -590,7 +589,7 @@ void Endstops::update() {
if (dual_hit) { \
_ENDSTOP_HIT(AXIS1, MINMAX); \
/* if not performing home or if both endstops were trigged during homing... */ \
if (!stepper.performing_homing || dual_hit == 0x3) \
if (!stepper.homing_dual_axis || dual_hit == 0x3) \
planner.endstop_triggered(_AXIS(AXIS1)); \
} \
}while(0)