Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Duet3D/RepRapFirmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Crocker <dcrocker@eschertech.com>2020-01-18 18:21:02 +0300
committerDavid Crocker <dcrocker@eschertech.com>2020-01-18 18:21:02 +0300
commite0bbf71357b07c22e6d43be3cca5c7422163be32 (patch)
treeca83dbb87348e51c735b106900b69142f5c058f5 /src/Endstops/ZProbeEndstop.cpp
parentd577af1d5874392d28c65427afbf4006f8a6d521 (diff)
Lock ZProbes when accessing them and added more items to OM
Diffstat (limited to 'src/Endstops/ZProbeEndstop.cpp')
-rw-r--r--src/Endstops/ZProbeEndstop.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Endstops/ZProbeEndstop.cpp b/src/Endstops/ZProbeEndstop.cpp
index dc12dd5f..c4c919a0 100644
--- a/src/Endstops/ZProbeEndstop.cpp
+++ b/src/Endstops/ZProbeEndstop.cpp
@@ -20,8 +20,8 @@ ZProbeEndstop::ZProbeEndstop(uint8_t axis, EndStopPosition pos) noexcept : Endst
// Test whether we are at or near the stop
EndStopHit ZProbeEndstop::Stopped() const noexcept
{
- const ZProbe * const zp = reprap.GetPlatform().GetEndstops().GetZProbe(zProbeNumber);
- return (zp != nullptr) ? zp->Stopped() : EndStopHit::atStop;
+ const auto zp = reprap.GetPlatform().GetEndstops().GetZProbe(zProbeNumber);
+ return (zp.IsNotNull()) ? zp->Stopped() : EndStopHit::atStop;
}
// This is called to prime axis endstops