Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update so printer does not issue pause when ejecting filament #184

Merged
merged 1 commit into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion extras/AFC.py
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,10 @@ def cmd_LANE_UNLOAD(self, gcmd):
CUR_LANE = self.printer.lookup_object('AFC_stepper '+ lane)
CUR_HUB = self.printer.lookup_object('AFC_hub '+ CUR_LANE.unit)
if CUR_LANE.name != self.current:
# Setting status as ejecting so if filament is removed and de-activates the prep sensor while
# extruder motors are still running it does not trigger infinite spool or pause logic
# once user removes filament lanes status will go to None
CUR_LANE.status = 'ejecting'
CUR_LANE.do_enable(True)
if CUR_LANE.hub_load:
CUR_LANE.move(CUR_LANE.dist_hub * -1, CUR_LANE.dist_hub_move_speed, CUR_LANE.dist_hub_move_accel, True if CUR_LANE.dist_hub > 200 else False)
Expand All @@ -478,7 +482,6 @@ def cmd_LANE_UNLOAD(self, gcmd):
CUR_LANE.do_enable(False)
self.lanes[CUR_LANE.unit][CUR_LANE.name]['hub_loaded'] = CUR_LANE.hub_load
self.save_vars()
CUR_LANE.status = None

# Removing spool from vars since it was ejected
self.SPOOL.set_spoolID( CUR_LANE, "")
Expand Down
2 changes: 1 addition & 1 deletion extras/AFC_stepper.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ def prep_callback(self, eventtime, state):
if self.load_state == True and self.prep_state == True:
self.status = 'Loaded'
self.AFC.afc_led(self.AFC.led_ready, led)
elif self.name == self.AFC.current and self.AFC.IDLE.state == 'Printing':
elif self.name == self.AFC.current and self.AFC.IDLE.state == 'Printing' and self.load_state and self.status != 'ejecting':
# Checking to make sure runout_lane is set and does not equal 'NONE'
if self.AFC.lanes[self.unit][self.name]['runout_lane'] and self.AFC.lanes[self.unit][self.name]['runout_lane'] != 'NONE':
self.status = None
Expand Down
Loading