MCPcopy Create free account
hub / github.com/AstroPrint/AstroBox / change_tool

Method change_tool

src/ext/makerbot_driver/Gcode/Parser.py:397–404  ·  view source on GitHub ↗

Sends a chagne tool command to the machine.

(self, codes, flags, comments)

Source from the content-addressed store, hash-verified

395 self.state.lose_position(axes)
396
397 def change_tool(self, codes, flags, comments):
398 """Sends a chagne tool command to the machine.
399 """
400 if 'T' in codes:
401 self.state.values['last_toolhead_index'] = codes['T']
402 self.state.values['tool_index'] = self.state.values['last_toolhead_index']
403 self._log.debug('{"event":"gcode_state_change", "change":"tool_change", "new_tool_index":%i}', self.state.values['last_toolhead_index'])
404 self.s3g.change_tool(self.state.values['last_toolhead_index'])
405
406 def build_start_notification(self, codes, flags, comments):
407 """Sends a build start notification command to the machine.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected