diff options
author | David Crocker <dcrocker@eschertech.com> | 2021-03-03 13:52:37 +0300 |
---|---|---|
committer | David Crocker <dcrocker@eschertech.com> | 2021-03-03 13:52:37 +0300 |
commit | f5b540bdca881d09fac7aecfbf4fefdbe0d48da0 (patch) | |
tree | 40c4c0bb32378ee33e53c251be74d4764d9df350 /src/GCodes | |
parent | 7a3045b53e3e303a988ce4565b2ac21206182ffb (diff) |
Got rid of "near endstop" status
Cherry picked from commit 165b178f7de75b1d00b26fec28f2a03fb36d6119
Diffstat (limited to 'src/GCodes')
-rw-r--r-- | src/GCodes/GCodes3.cpp | 2 | ||||
-rw-r--r-- | src/GCodes/GCodes4.cpp | 6 | ||||
-rw-r--r-- | src/GCodes/Trigger.cpp | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/GCodes/GCodes3.cpp b/src/GCodes/GCodes3.cpp index a30193e1..599caf83 100644 --- a/src/GCodes/GCodes3.cpp +++ b/src/GCodes/GCodes3.cpp @@ -508,7 +508,7 @@ GCodeResult GCodes::WaitForPin(GCodeBuffer& gb, const StringRef &reply) Platform& pfm = platform; const bool ok = endstopsToWaitFor.IterateWhile([&pfm, activeHigh](unsigned int axis, unsigned int)->bool { - const bool stopped = pfm.GetEndstops().Stopped(axis) == EndStopHit::atStop; + const bool stopped = pfm.GetEndstops().Stopped(axis); return stopped == activeHigh; } ) diff --git a/src/GCodes/GCodes4.cpp b/src/GCodes/GCodes4.cpp index 44fb7af8..3d1f0455 100644 --- a/src/GCodes/GCodes4.cpp +++ b/src/GCodes/GCodes4.cpp @@ -624,7 +624,7 @@ void GCodes::RunStateMachine(GCodeBuffer& gb, const StringRef& reply) noexcept doingManualBedProbe = true; // suspend the Z movement limit DoManualBedProbe(gb); } - else if (zp->Stopped() == EndStopHit::atStop) + else if (zp->Stopped()) { reprap.GetMove().heightMapLock.ReleaseWriter(); reprap.GetHeat().SuspendHeaters(false); @@ -910,7 +910,7 @@ void GCodes::RunStateMachine(GCodeBuffer& gb, const StringRef& reply) noexcept doingManualBedProbe = true; // suspend the Z movement limit DoManualBedProbe(gb); } - else if (zp->Stopped() == EndStopHit::atStop) // check for probe already triggered at start + else if (zp->Stopped()) // check for probe already triggered at start { // Z probe is already triggered at the start of the move, so abandon the probe and record an error reprap.GetHeat().SuspendHeaters(false); @@ -1200,7 +1200,7 @@ void GCodes::RunStateMachine(GCodeBuffer& gb, const StringRef& reply) noexcept else { const bool probingAway = sps.ProbingAway(); - const bool atStop = (zp->Stopped() == EndStopHit::atStop); + const bool atStop = zp->Stopped(); if (probingAway != atStop) { // Z probe is already in target state at the start of the move, so abandon the probe and signal an error if the type demands so diff --git a/src/GCodes/Trigger.cpp b/src/GCodes/Trigger.cpp index 49583d9b..7383e7e9 100644 --- a/src/GCodes/Trigger.cpp +++ b/src/GCodes/Trigger.cpp @@ -44,7 +44,7 @@ bool Trigger::Check() noexcept EndstopsManager& endstops = reprap.GetPlatform().GetEndstops(); endstopsMonitored.Iterate([this, &endstops, &triggered](unsigned int axis, unsigned int) { - const bool stopped = (endstops.Stopped(axis) == EndStopHit::atStop); + const bool stopped = endstops.Stopped(axis); if (stopped != endstopStates.IsBitSet(axis)) { if (stopped) |