(self)
| 13 | commands against an s3g machine. |
| 14 | """ |
| 15 | def __init__(self): |
| 16 | self.state = makerbot_driver.Gcode.GcodeStates() |
| 17 | self.s3g = None |
| 18 | self.environment = {} |
| 19 | self.line_number = 1 |
| 20 | self._log = logging.getLogger(self.__class__.__name__) |
| 21 | |
| 22 | # Note: The datastructure looks like this: |
| 23 | # [0] : command name |
| 24 | # [1] : allowed codes |
| 25 | # [2] : allowed flags |
| 26 | |
| 27 | self.GCODE_INSTRUCTIONS = { |
| 28 | 1: [self.linear_interpolation, 'XYZABEF', ''], |
| 29 | 4: [self.dwell, 'P', ''], |
| 30 | 92: [self.set_position, 'XYZABE', ''], |
| 31 | 130: [self.set_potentiometer_values, 'XYZAB', ''], |
| 32 | 161: [self.find_axes_minimums, 'F', 'XYZ'], |
| 33 | 162: [self.find_axes_maximums, 'F', 'XYZ'], |
| 34 | } |
| 35 | |
| 36 | self.MCODE_INSTRUCTIONS = { |
| 37 | 18: [self.disable_axes, '', 'XYZAB'], |
| 38 | 70: [self.display_message, 'P', ''], |
| 39 | 72: [self.play_song, 'P', ''], |
| 40 | 73: [self.set_build_percentage, 'P', ''], |
| 41 | 104: [self.set_toolhead_temperature, 'ST', ''], |
| 42 | 109: [self.set_platform_temperature, 'ST', ''], |
| 43 | 126: [self.enable_extra_output, 'T', ''], |
| 44 | 127: [self.disable_extra_output, 'T', ''], |
| 45 | 132: [self.load_position, '', 'XYZAB'], |
| 46 | 133: [self.wait_for_tool_ready, 'PT', ''], |
| 47 | 134: [self.wait_for_platform_ready, 'PT', ''], |
| 48 | 135: [self.change_tool, 'T', ''], |
| 49 | 136: [self.build_start_notification, '', ''], |
| 50 | 137: [self.build_end_notification, '', ''], |
| 51 | } |
| 52 | |
| 53 | def execute_line(self, command): |
| 54 | """ |
nothing calls this directly
no outgoing calls
no test coverage detected