فهرست منبع

- in CNCJob UI Autolevelling - Probing GCode has now a header

Marius Stanciu 5 سال پیش
والد
کامیت
e0ec8ac44f
3فایلهای تغییر یافته به همراه22 افزوده شده و 2 حذف شده
  1. 1 0
      CHANGELOG.md
  2. 20 1
      appObjects/FlatCAMCNCJob.py
  3. 1 1
      app_Main.py

+ 1 - 0
CHANGELOG.md

@@ -12,6 +12,7 @@ CHANGELOG for FlatCAM beta
 - in CNCJob UI Autolevelling - updated the UI with controls for probing GCode parameters and added signals and slots for the UI
 - in CNCJob UI Autolevelling - added a mini gcode sender for the GRBL to be able to send the probing GCode and get the height map (I may make a small and light app for that so it does not need to have FlatCAM on the GCode sender PC)
 - in CNCJob UI Autolevelling finished the probing GCode generation for MACH/LinuxCNC controllers; this GCode can also be viewed
+- in CNCJob UI Autolevelling - Probing GCode has now a header
 
 14.08.2020
 

+ 20 - 1
appObjects/FlatCAMCNCJob.py

@@ -969,6 +969,20 @@ class CNCJobObject(FlatCAMObj, CNCjob):
 
         p_gcode = ''
         header = ''
+        time_str = "{:%A, %d %B %Y at %H:%M}".format(datetime.now())
+
+        header += '(G-CODE GENERATED BY FLATCAM v%s - www.flatcam.org - Version Date: %s)\n' % \
+                  (str(self.app.version), str(self.app.version_date)) + '\n'
+
+        header += '(This is a autolevelling probing GCode.)\n' \
+                  '(Make sure that before you start the job you first do a zero for all axis.)\n' \
+                  '(This means that you need to zero the CNC axis and then jog to the toolchange X, Y location,)\n\n'
+
+        header += '(Name: ' + str(self.options['name']) + ')\n'
+        header += '(Type: ' + "Autolevelling Probing GCode " + ')\n'
+
+        header += '(Units: ' + self.units.upper() + ')\n'
+        header += '(Created on ' + time_str + ')\n\n'
 
         # commands
         if controller == 'MACH3':
@@ -1211,7 +1225,7 @@ class CNCJobObject(FlatCAMObj, CNCjob):
         self.gcode_editor_tab = AppTextEditor(app=self.app, plain_text=True)
 
         # add the tab if it was closed
-        self.app.ui.plot_tab_area.addTab(self.gcode_editor_tab, '%s' % _("Code Editor"))
+        self.app.ui.plot_tab_area.addTab(self.gcode_editor_tab, '%s' % _("Code Review"))
         self.gcode_editor_tab.setObjectName('code_editor_tab')
 
         # delete the absolute and relative position and messages in the infobar
@@ -1237,6 +1251,11 @@ class CNCJobObject(FlatCAMObj, CNCjob):
 
         self.gcode_editor_tab.buttonSave.hide()
         self.gcode_editor_tab.buttonOpen.hide()
+        self.gcode_editor_tab.buttonPrint.hide()
+        self.gcode_editor_tab.buttonPreview.hide()
+        self.gcode_editor_tab.buttonReplace.hide()
+        self.gcode_editor_tab.sel_all_cb.hide()
+        self.gcode_editor_tab.entryReplace.hide()
         self.gcode_editor_tab.code_editor.setReadOnly(True)
 
         self.app.inform.emit('[success] %s...' % _('Loaded Machine Code into Code Editor'))

+ 1 - 1
app_Main.py

@@ -166,7 +166,7 @@ class App(QtCore.QObject):
     # ###############################################################################################################
     version = "Unstable Version"
     # version = 8.994
-    version_date = "2020/07/05"
+    version_date = "2020/09/30"
     beta = True
 
     engine = '3D'