Skip to content

Commit

Permalink
Fix the "fetch" when a sharp angle happens to avoid hitting the rack.…
Browse files Browse the repository at this point in the history
… I fixed the "put back" but didn't even think about doing the fetch too. Now it is fixed.
  • Loading branch information
corbinstreehouse committed May 22, 2023
1 parent 3e7bed4 commit 9ab8702
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Modules/CorbinsWorkshop/ToolChange.lua
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@ function ToolChange.LoadToolAtForkPosition(toolForkPosition, toolWasDroppedOff)

ToolChange.CloseDrawBar()

-- slight wait for the close to really happen
MCCntlGcodeExecuteWait("G04 P%.4f", 0.2)

-- Goes back down to zPos after being higher by the ToolForks.ZBump ...so we can slide out safely
Expand All @@ -315,6 +316,14 @@ function ToolChange.LoadToolAtForkPosition(toolForkPosition, toolWasDroppedOff)

------ Move Z to home position ------
MCCntlGcodeExecuteWait("G00 G90 G53 Z0.0\n")

-- avoid hitting the fork by going back to the intermediate position, if we have to.
-- we might want to just always do this..not sure.
local intermidatePosNeeded, intX, intY = ToolChange.GetIntermediateMovePositionIfNeeded(toolForkPosition)
if intermidatePosNeeded then
MCCntlGcodeExecuteWait("G00 G53 X%.4f Y%.4f", intX, intY)
end

end

function ToolChange.GotoManualToolChangeLocation()
Expand Down

0 comments on commit 9ab8702

Please sign in to comment.