This commit is contained in:
Nikolay Khabarov
2017-05-21 13:18:10 +03:00
parent 3b73d7dcc4
commit 888d96d8c4
2 changed files with 5 additions and 2 deletions

View File

@@ -19,7 +19,7 @@ perfect choice for easy development of this project.
Video demo - [YouTube video](https://youtu.be/vcedo59raS4)
# Current command support
G0, G1, G4, G20, G21, G28, G90, G91, G92, M2, M3, M5, M30
G0, G1, G4, G20, G21, G28, G53, G90, G91, G92, M2, M3, M5, M30
Commands can be easily added, see [gmachine.py](./cnc/gmachine.py) file.
# Config

View File

@@ -124,13 +124,16 @@ class GMachine(object):
self._convertCoordinates = 1.0
elif c == 'G28': # home
self.home()
elif c == 'G53': # switch to machine coords
self._local = Coordinates(0.0, 0.0, 0.0)
elif c == 'G90': # switch to absolute coords
self._absoluteCoordinates = True
elif c == 'G91': # switch to relative coords
self._absoluteCoordinates = False
elif c == 'G92': # switch to local coords
self._local = self._position - \
gcode.coordinates(Coordinates(0.0, 0.0, 0.0), self._convertCoordinates)
gcode.coordinates(Coordinates(0.0, 0.0, 0.0),
self._convertCoordinates)
elif c == 'M3': # spinle on
self._spindle(spindle_rpm)
elif c == 'M5': # spindle off