Skip to content

Commit

Permalink
Ignore temporary limit assertion when pulling off
Browse files Browse the repository at this point in the history
  • Loading branch information
MitchBradley committed Oct 2, 2022
1 parent b89d672 commit 8d297a8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
7 changes: 3 additions & 4 deletions FluidNC/src/Machine/Homing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -262,14 +262,13 @@ namespace Machine {
// means in terms of axes, motors, and whether to stop and replan
MotorMask limited = Machine::Axes::posLimitMask | Machine::Axes::negLimitMask;

log_debug("Homing limited" << config->_axes->motorMaskToNames(limited));

if (!approach()) {
// We are not supposed to see a limitReached event while pulling off
fail(ExecAlarm::HomingFailPulloff);
// Ignore limit switch chatter while pulling off
return;
}

log_debug("Homing limited" << config->_axes->motorMaskToNames(limited));

bool stop = config->_kinematics->limitReached(_phaseAxes, _phaseMotors, limited);

// stop tells us whether we have to halt the motion and replan a new move to
Expand Down
6 changes: 1 addition & 5 deletions FluidNC/src/Machine/LimitPin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
#include "src/Limits.h"
#include "src/Protocol.h" // protocol_send_event_from_ISR()

#include "soc/soc.h"
#include "soc/gpio_periph.h"
#include "hal/gpio_hal.h"

namespace Machine {
LimitPin::LimitPin(Pin& pin, int axis, int motor, int direction, bool& pHardLimits, bool& pLimited) :
EventPin(&limitEvent, "Limit", &pin), _axis(axis), _motorNum(motor), _value(false), _pHardLimits(pHardLimits), _pLimited(pLimited) {
Expand Down Expand Up @@ -54,7 +50,7 @@ namespace Machine {
update(get());
}

void IRAM_ATTR LimitPin::update(bool value) {
void LimitPin::update(bool value) {
log_debug(_legend << " " << value);
_pLimited = value;

Expand Down

0 comments on commit 8d297a8

Please sign in to comment.