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/GCodes/GCodes.cpp
parentd577af1d5874392d28c65427afbf4006f8a6d521 (diff)
Lock ZProbes when accessing them and added more items to OM
Diffstat (limited to 'src/GCodes/GCodes.cpp')
-rw-r--r--src/GCodes/GCodes.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/GCodes/GCodes.cpp b/src/GCodes/GCodes.cpp
index a926657b..1df814ba 100644
--- a/src/GCodes/GCodes.cpp
+++ b/src/GCodes/GCodes.cpp
@@ -2583,7 +2583,8 @@ GCodeResult GCodes::ExecuteG30(GCodeBuffer& gb, const StringRef& reply)
{
// Do a Z probe at the specified point.
gb.SetState(GCodeState::probingAtPoint0);
- if (platform.GetCurrentZProbeType() != ZProbeType::none && platform.GetCurrentZProbeType() != ZProbeType::blTouch && !probeIsDeployed)
+ const ZProbeType t = platform.GetCurrentZProbeType();
+ if (t != ZProbeType::none && t != ZProbeType::blTouch && !probeIsDeployed)
{
DoFileMacro(gb, DEPLOYPROBE_G, false, 30);
}
@@ -2654,7 +2655,8 @@ GCodeResult GCodes::ProbeGrid(GCodeBuffer& gb, const StringRef& reply)
gridXindex = gridYindex = 0;
gb.SetState(GCodeState::gridProbing1);
- if (platform.GetCurrentZProbeType() != ZProbeType::none && platform.GetCurrentZProbeType() != ZProbeType::blTouch && !probeIsDeployed)
+ const ZProbeType t = platform.GetCurrentZProbeType();
+ if (t != ZProbeType::none && t != ZProbeType::blTouch && !probeIsDeployed)
{
DoFileMacro(gb, DEPLOYPROBE_G, false, 29);
}