Skip to content

Commit

Permalink
Changing lane.name to lane since lane is the name
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmyjon711 committed Dec 20, 2024
1 parent 9ffdb70 commit 6e09b7d
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions extras/AFC.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ def cmd_LANE_MOVE(self, gcmd):
if lane not in self.stepper:
self.gcode.respond_info('{} Unknown'.format(lane.upper()))
return
CUR_LANE = self.stepper[lane.name]
CUR_LANE = self.stepper[lane]
CUR_LANE.move(distance, self.short_moves_speed, self.short_moves_accel, True)

def save_pos(self):
Expand Down Expand Up @@ -364,7 +364,7 @@ def cmd_HUB_CUT_TEST(self, gcmd):
if lane not in self.stepper:
self.gcode.respond_info('{} Unknown'.format(lane.upper()))
return
CUR_LANE = self.stepper[lane.name]
CUR_LANE = self.stepper[lane]
CUR_HUB = self.printer.lookup_object('AFC_hub ' + CUR_LANE.unit)
CUR_HUB.hub_cut(CUR_LANE)
self.gcode.respond_info('Hub cut Done!')
Expand Down Expand Up @@ -397,7 +397,7 @@ def cmd_TEST(self, gcmd):
if lane not in self.stepper:
self.gcode.respond_info('{} Unknown'.format(lane.upper()))
return
CUR_LANE = self.stepper[lane.name]
CUR_LANE = self.stepper[lane]
self.gcode.respond_info('Testing at full speed')
CUR_LANE.assist(-1)
self.reactor.pause(self.reactor.monotonic() + 1)
Expand Down Expand Up @@ -440,7 +440,7 @@ def cmd_HUB_LOAD(self, gcmd):
if lane not in self.stepper:
self.gcode.respond_info('{} Unknown'.format(lane.upper()))
return
CUR_LANE = self.stepper[lane.name]
CUR_LANE = self.stepper[lane]
CUR_HUB = self.printer.lookup_object('AFC_hub '+ CUR_LANE.unit)
if CUR_LANE.prep_state == False: return

Expand Down Expand Up @@ -485,7 +485,7 @@ def cmd_LANE_UNLOAD(self, gcmd):
if lane not in self.stepper:
self.gcode.respond_info('{} Unknown'.format(lane.upper()))
return
CUR_LANE = self.stepper[lane.name]
CUR_LANE = self.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
Expand Down Expand Up @@ -536,7 +536,7 @@ def cmd_TOOL_LOAD(self, gcmd):
if self.current is not None:
self.ERROR.AFC_error("Cannot load {}, {} currently loaded".format(lane.upper(), self.current.upper()), pause=False)
return
CUR_LANE = self.stepper[lane.name]
CUR_LANE = self.stepper[lane]
self.TOOL_LOAD(CUR_LANE)

def TOOL_LOAD(self, CUR_LANE):
Expand Down Expand Up @@ -717,7 +717,7 @@ def cmd_TOOL_UNLOAD(self, gcmd):
if lane not in self.stepper:
self.gcode.respond_info('{} Unknown'.format(lane.upper()))
return
CUR_LANE = self.stepper[lane.name]
CUR_LANE = self.stepper[lane]
self.TOOL_UNLOAD(CUR_LANE)

# User manually unloaded spool from toolhead, remove spool from active status
Expand Down Expand Up @@ -956,7 +956,7 @@ def cmd_CHANGE_TOOL(self, gcmd):
if lane not in self.stepper:
self.gcode.respond_info('{} Unknown'.format(lane.upper()))
return
CUR_LANE = self.stepper[lane.name]
CUR_LANE = self.stepper[lane]
# Check if the lane has completed the preparation process required for tool changes.
if CUR_LANE._afc_prep_done:
# Log the tool change operation for debugging or informational purposes.
Expand All @@ -978,7 +978,7 @@ def cmd_CHANGE_TOOL(self, gcmd):
if lane not in self.stepper:
self.gcode.respond_info('{} Unknown'.format(lane.upper()))
return
CUR_LANE = self.stepper[lane.name]
CUR_LANE = self.stepper[lane]
# Load the new lane and restore the toolhead position if successful.
if self.TOOL_LOAD(CUR_LANE) and not self.error_state:
self.gcode.respond_info("{} is now loaded in toolhead".format(lane))
Expand Down

0 comments on commit 6e09b7d

Please sign in to comment.