26 lines
786 B
Plaintext
26 lines
786 B
Plaintext
M98 R1
|
|
|
|
var eAxis = -1
|
|
|
|
while var.eAxis == -1 && iterations < #move.axes
|
|
if iterations >= #move.axes
|
|
break
|
|
if move.axes[iterations].letter == global.mmu_extruder_axis
|
|
set var.eAxis = iterations
|
|
|
|
if var.eAxis == -1
|
|
abort "Cannot find endstop axis: " ^ var.eAxis
|
|
|
|
var eAxisTriggered = sensors.endstops[var.eAxis] != null && sensors.endstops[var.eAxis].triggered
|
|
if !var.eAxisTriggered
|
|
M98 P"mmu/lib/disengage.g" ; disengage the selector so that filament can be pushed in.
|
|
var errmsg = "Expected selector to be loaded but it's not!"
|
|
echo var.errmsg
|
|
if state.status == "processing"
|
|
M291 P{var.errmsg} R"Check Selector and click continue to try again." S2
|
|
M98 R1
|
|
M226
|
|
else
|
|
abort "Selector/Filament endstop is is not triggered"
|
|
M98 P"mmu/lib/engage.g"
|