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:
Kevin O'Connor 2018-06-30 14:08:02 -04:00
parent 53b718a621
commit 4ad44e3e83
6 changed files with 10 additions and 10 deletions

View file

@ -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: