Lesson Learned
Had a setback in working on this. it was working last night, went to fire up pathpilot and get
Code:
Traceback (most recent call last):
File "/home/operator/tmc/python/tormach_lathe_ui.py", line 7340, in <module>
UI = lathe()
File "/home/operator/tmc/python/tormach_lathe_ui.py", line 894, in __init__
self.setup_gcode_marks()
File "/home/operator/v1.9.8/python/ui_common.py", line 738, in setup_gcode_marks
self.sourceview.set_buffer(self.gcodelisting_buffer)
AttributeError: 'NoneType' object has no attribute 'set_buffer'
Shutting down and cleaning up LinuxCNC...
I did a diff on ui_common.py to the original 1.9.8 version and they match, I also compared all *.py in ~/python to the original and only the changes I made where there. took a look at the glade source. after searching I found the problem.
looking at ui_common.py
Code:
self.sourceview = self.builder.get_object("gcode_sourceview")
self.gcodelisting_buffer = gtksourceview2.Buffer()
self.sourceview.set_buffer(self.gcodelisting_buffer)
Well there are no reference to gcode_sourceview in the glade file.
checking as to why I found I had restarted glade after starting a new session. I had lost the rip_environment and when I saved the glade file it removed that entire section when it saved. Oye!
So I restored that section and the gui is back up and running.
I wanted to add Spindle Orientation to the gui and I've decided what I'll do is use the Y-DRO for that. I've added a "Use Y Axis for C Axis" to the settings tab. if checked I'll change the Label on Y to C1 and unhide the Label, DRO and LED. then the Y-DRO will display the current angle of the C Axis (Spindle). Of course you'll need an encoder on the spindle to work. and it will be orientate to the Index Pulse. so that it resets after 360. on mine I have a 1440 PPR encoder (that is the 4x count) which is about .25 deg per count. So I'll display something like 123.50 in the DRO. this will be the biggest GUI change yet and may take a bit. especially sicne I'm putting a Rostock MAX 3d printer together also.