- fixed the Marlin postprocessor detection in GCode header

- the version date in GCode header is now the one set in FlatCAMApp.App.version_date
- fixed bug in postprocessor files: number of drills is now calculated only for the Excellon objects in toolchange function (only Excellon objects have drills)
This commit is contained in:
Marius Stanciu
2019-01-07 02:56:55 +02:00
committed by Marius S
parent 954bd9097a
commit c7db9aa566
6 changed files with 43 additions and 23 deletions

View File

@@ -71,11 +71,10 @@ class grbl_11(FlatCAMPostProc):
else:
toolC_formatted = format(p.toolC, '.4f')
for i in p['options']['Tools_in_use']:
if i[0] == p.tool:
no_drills = i[2]
if str(p['options']['type']) == 'Excellon':
for i in p['options']['Tools_in_use']:
if i[0] == p.tool:
no_drills = i[2]
return """G00 Z{toolchangez}
T{tool}
M5

View File

@@ -75,11 +75,10 @@ class manual_toolchange(FlatCAMPostProc):
else:
toolC_formatted = format(p.toolC, '.4f')
for i in p['options']['Tools_in_use']:
if i[0] == p.tool:
no_drills = i[2]
if str(p['options']['type']) == 'Excellon':
for i in p['options']['Tools_in_use']:
if i[0] == p.tool:
no_drills = i[2]
return """G00 Z{toolchangez}
T{tool}
M5

View File

@@ -69,11 +69,10 @@ class marlin(FlatCAMPostProc):
else:
toolC_formatted = format(p.toolC, '.4f')
for i in p['options']['Tools_in_use']:
if i[0] == p.tool:
no_drills = i[2]
if str(p['options']['type']) == 'Excellon':
for i in p['options']['Tools_in_use']:
if i[0] == p.tool:
no_drills = i[2]
return """G0 Z{toolchangez}
M5
M0 Change to Tool Dia = {toolC}, Total drills for current tool = {t_drills}