mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-07 23:17:37 -06:00
gcode: Rename run_script() to run_script_from_command()
Emphasize that the run_script() method is only valid when run from a g-code command. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
53b718a621
commit
4ad44e3e83
6 changed files with 10 additions and 10 deletions
|
@ -235,7 +235,7 @@ class GCodeParser:
|
|||
self.process_pending()
|
||||
self.is_processing_data = False
|
||||
return True
|
||||
def run_script(self, script):
|
||||
def run_script_from_command(self, script):
|
||||
prev_need_ack = self.need_ack
|
||||
try:
|
||||
self.process_commands(script.split('\n'), need_ack=False)
|
||||
|
@ -390,7 +390,7 @@ class GCodeParser:
|
|||
e = extruders[index]
|
||||
if self.extruder is e:
|
||||
return
|
||||
self.run_script(self.extruder.get_activate_gcode(False))
|
||||
self.run_script_from_command(self.extruder.get_activate_gcode(False))
|
||||
try:
|
||||
self.toolhead.set_extruder(e)
|
||||
except homing.EndstopError as e:
|
||||
|
@ -399,7 +399,7 @@ class GCodeParser:
|
|||
self.reset_last_position()
|
||||
self.extrude_factor = 1.
|
||||
self.base_position[3] = self.last_position[3]
|
||||
self.run_script(self.extruder.get_activate_gcode(True))
|
||||
self.run_script_from_command(self.extruder.get_activate_gcode(True))
|
||||
def cmd_mux(self, params):
|
||||
key, values = self.mux_commands[params['#command']]
|
||||
if None in values:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue