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/GCodes4.cpp')
-rw-r--r--src/GCodes/GCodes4.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/GCodes/GCodes4.cpp b/src/GCodes/GCodes4.cpp
index 1e16be06..85062b96 100644
--- a/src/GCodes/GCodes4.cpp
+++ b/src/GCodes/GCodes4.cpp
@@ -245,6 +245,7 @@ void GCodes::RunStateMachine(GCodeBuffer& gb, const StringRef& reply)
if (oldTool != nullptr)
{
reprap.StandbyTool(oldTool->Number(), simulationMode != 0);
+ UpdateCurrentUserPosition(); // the tool offset may have changed, so get the current position
}
gb.AdvanceState();
if (reprap.GetTool(gb.MachineState().newToolNumber) != nullptr && AllAxesAreHomed() && (gb.MachineState().toolChangeParam & TPreBit) != 0)
@@ -261,7 +262,7 @@ void GCodes::RunStateMachine(GCodeBuffer& gb, const StringRef& reply)
if (LockMovementAndWaitForStandstill(gb)) // wait for tpre.g to finish executing
{
reprap.SelectTool(gb.MachineState().newToolNumber, simulationMode != 0);
- UpdateCurrentUserPosition(); // get the actual position of the new tool
+ UpdateCurrentUserPosition(); // get the actual position of the new tool
gb.AdvanceState();
if (AllAxesAreHomed())