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>2021-11-05 16:11:56 +0300
committerDavid Crocker <dcrocker@eschertech.com>2021-11-05 16:11:56 +0300
commit4d234ccee43850f2a27d7ed14427583ce79e9bdb (patch)
treed3181e32fa4832a5808da785090c0aeac4cb8879
parent665324f5188916b079055af9cf71bea1b3fa56e8 (diff)
We no longer restore position automatically after a tool change
-rw-r--r--src/GCodes/GCodeMachineState.h2
-rw-r--r--src/GCodes/GCodes4.cpp31
2 files changed, 0 insertions, 33 deletions
diff --git a/src/GCodes/GCodeMachineState.h b/src/GCodes/GCodeMachineState.h
index a6bb3e2a..3ea86bce 100644
--- a/src/GCodes/GCodeMachineState.h
+++ b/src/GCodes/GCodeMachineState.h
@@ -45,14 +45,12 @@ enum class GCodeState : uint8_t
toolChange0,
toolChange1,
toolChange2,
- toolChange3,
toolChangeComplete,
// These next 6 must be contiguous
m109ToolChange0,
m109ToolChange1,
m109ToolChange2,
- m109ToolChange3,
m109ToolChangeComplete,
m109WaitForTemperature,
diff --git a/src/GCodes/GCodes4.cpp b/src/GCodes/GCodes4.cpp
index 663d1fb5..13cafeaa 100644
--- a/src/GCodes/GCodes4.cpp
+++ b/src/GCodes/GCodes4.cpp
@@ -380,37 +380,6 @@ void GCodes::RunStateMachine(GCodeBuffer& gb, const StringRef& reply) noexcept
}
break;
- case GCodeState::toolChange3: // move the new tool to the correct height
- case GCodeState::m109ToolChange3: // move the new tool to the correct height
- if (LockMovementAndWaitForStandstill(gb)) // wait for tpost.g to finish executing
- {
- // Check here if the tool offsets being applied would exceed Z axis limits
- auto currentTool = reprap.GetCurrentTool();
- if (currentTool != nullptr)
- {
- const float newZPos = (moveState.coords[Z_AXIS] - currentTool->GetOffset(Z_AXIS));
- if (newZPos > platform.AxisMaximum(Z_AXIS) || newZPos < platform.AxisMinimum(Z_AXIS))
- {
- gb.LatestMachineState().feedRate = toolChangeRestorePoint.feedRate;
- doingToolChange = false;
- gb.LatestMachineState().SetError("New tool too close to Z axis limit. Aborting tool change");
- AbortPrint(gb);
- gb.SetState(GCodeState::checkError);
- break;
- }
- }
-
- // Restore the original Z axis user position, so that different tool Z offsets work even if the first move after the tool change doesn't have a Z coordinate
- SetMoveBufferDefaults();
- moveState.currentUserPosition[Z_AXIS] = toolChangeRestorePoint.moveCoords[Z_AXIS];
- ToolOffsetTransform(moveState.currentUserPosition, moveState.coords);
- moveState.feedRate = ConvertSpeedFromMmPerMin(DefaultFeedRate); // ask for a good feed rate, we may have paused during a slow move
- moveState.tool = reprap.GetCurrentTool(); // needed so that bed compensation is applied correctly
- NewMoveAvailable(1);
- gb.AdvanceState();
- }
- break;
-
case GCodeState::toolChangeComplete:
case GCodeState::m109ToolChangeComplete:
if (LockMovementAndWaitForStandstill(gb)) // wait for the move to height to finish