- added a Gcode end_command: default is M02
This commit is contained in:
@@ -5539,6 +5539,17 @@ class FlatCAMCNCjob(FlatCAMObj, CNCjob):
|
|||||||
|
|
||||||
return gcode
|
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):
|
def export_gcode(self, filename=None, preamble='', postamble='', to_file=False):
|
||||||
gcode = ''
|
gcode = ''
|
||||||
roland = False
|
roland = False
|
||||||
@@ -5603,7 +5614,7 @@ class FlatCAMCNCjob(FlatCAMObj, CNCjob):
|
|||||||
))
|
))
|
||||||
return
|
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 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:
|
if self.ui.toolchange_cb.get_value() is True:
|
||||||
|
|||||||
Reference in New Issue
Block a user