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:
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);
}