Explicitely sets the position of the state machine and bot to the given point
(self, codes, flags, comment)
| 194 | self.state.lose_position(flags) |
| 195 | |
| 196 | def set_position(self, codes, flags, comment): |
| 197 | """Explicitely sets the position of the state machine and bot |
| 198 | to the given point |
| 199 | """ |
| 200 | new_point = self.state.position.copy() |
| 201 | self.state.update_point_with_codes(new_point, codes, self.state.values.get('tool_index', None)) |
| 202 | new_position = new_point.ToList() |
| 203 | stepped_position = makerbot_driver.Gcode.multiply_vector( |
| 204 | new_position, |
| 205 | self.state.get_axes_values('steps_per_mm') |
| 206 | ) |
| 207 | try: |
| 208 | self.s3g.set_extended_position(stepped_position) |
| 209 | except Exception: |
| 210 | raise |
| 211 | else: |
| 212 | self.state.update_point_with_codes(self.state.position, codes, self.state.values.get('tool_index', None)) |
| 213 | |
| 214 | def wait_for_tool_ready(self, codes, flags, comment): |
| 215 | """ |
nothing calls this directly
no test coverage detected