- added a Gcode end_command: default is M02

This commit is contained in:
Marius Stanciu 2019-04-03 16:14:26 +03:00 committed by Marius
parent 0a9148f30a
commit 5e9a27ca45
2 changed files with 13 additions and 1 deletions

View File

@ -5539,6 +5539,17 @@ class FlatCAMCNCjob(FlatCAMObj, CNCjob):
return gcode
def gcode_footer(self, end_command=None):
"""
:param end_command: 'M02' or 'M30' - String
:return:
"""
if end_command:
return end_command
else:
return 'M02'
def export_gcode(self, filename=None, preamble='', postamble='', to_file=False):
gcode = ''
roland = False
@ -5603,7 +5614,7 @@ class FlatCAMCNCjob(FlatCAMObj, CNCjob):
))
return
g = gcode[:g_idx] + preamble + '\n' + gcode[g_idx:] + postamble
g = gcode[:g_idx] + preamble + '\n' + gcode[g_idx:] + postamble + self.gcode_footer()
# if toolchange custom is used, replace M6 code with the code from the Toolchange Custom Text box
if self.ui.toolchange_cb.get_value() is True:

View File

@ -13,6 +13,7 @@ CAD program, and create G-Code for Isolation routing.
- fixed plotting in Gerber Editor
- working on GUI in Gerber Editor
- added a Gcode end_command: default is M02
31.03.2019