diff options
author | David Crocker <dcrocker@eschertech.com> | 2021-09-24 20:04:56 +0300 |
---|---|---|
committer | David Crocker <dcrocker@eschertech.com> | 2021-09-24 20:04:56 +0300 |
commit | 1f96a9d2963e90e62211b7708885bf8757cbca10 (patch) | |
tree | 46b4a43578032d40b2aa5476420b9183248fba83 /src/GCodes/GCodes4.cpp | |
parent | c006deccbb21f48c7ece8c496dfd492c2ba739a2 (diff) |
Fixed wonky delta prints, also added a new simulation mode
Diffstat (limited to 'src/GCodes/GCodes4.cpp')
-rw-r--r-- | src/GCodes/GCodes4.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/GCodes/GCodes4.cpp b/src/GCodes/GCodes4.cpp index 65ebe0cc..ab8c3689 100644 --- a/src/GCodes/GCodes4.cpp +++ b/src/GCodes/GCodes4.cpp @@ -345,7 +345,7 @@ void GCodes::RunStateMachine(GCodeBuffer& gb, const StringRef& reply) noexcept const Tool * const oldTool = reprap.GetCurrentTool(); if (oldTool != nullptr) { - reprap.StandbyTool(oldTool->Number(), simulationMode != 0); + reprap.StandbyTool(oldTool->Number(), IsSimulating()); UpdateCurrentUserPosition(); // the tool offset may have changed, so get the current position } gb.AdvanceState(); @@ -362,7 +362,7 @@ void GCodes::RunStateMachine(GCodeBuffer& gb, const StringRef& reply) noexcept case GCodeState::m109ToolChange2: // select the new tool if it exists and run tpost if (LockMovementAndWaitForStandstill(gb)) // wait for tpre.g to finish executing { - reprap.SelectTool(newToolNumber, simulationMode != 0); + reprap.SelectTool(newToolNumber, IsSimulating()); UpdateCurrentUserPosition(); // get the actual position of the new tool gb.AdvanceState(); @@ -432,7 +432,7 @@ void GCodes::RunStateMachine(GCodeBuffer& gb, const StringRef& reply) noexcept break; case GCodeState::m109WaitForTemperature: - if (cancelWait || simulationMode != 0 || ToolHeatersAtSetTemperatures(reprap.GetCurrentTool(), gb.LatestMachineState().waitWhileCooling, TEMPERATURE_CLOSE_ENOUGH)) + if (cancelWait || IsSimulating() || ToolHeatersAtSetTemperatures(reprap.GetCurrentTool(), gb.LatestMachineState().waitWhileCooling, TEMPERATURE_CLOSE_ENOUGH)) { cancelWait = isWaiting = false; gb.SetState(GCodeState::normal); |