My changes to the probe screen code are mostly wrapped up, but I still have an issue that I can't seem to sort out and I am confused by some of the problems I am seeing.
Here is what I changed:
- Added support for gscreen in error poll.
- Reworked the ocore and gcode functions to wait for the interpreter idle rather than using linuxcnc.wait_complete(). I found that wait_complete() frequently returns before an action is complete. This causes erratic problems and frequently would end up picking up the result for the search probe rather than the final one.
- Changed the way MDI mode is entered by putting a call to mdi_start() at the beginning and mdi_end() at the end of every button press function. These functions save the current mode, set MDI mode and then at the end set the mode to the saved mode.
- Set the spin button defaults, resolution and increments to work with Imperial units.
The problem that I can't seen to figure out is errors about not being in MDI mode. I found that Gscreen sets the mode to manual when the interpreter goes idle if the GUI is set to manual. I fixed this and verified that the mode is set to MDI but I still get random errors unless I set the mode to MDI in the GUI. I am out of ideas for now.
I could use some feedback.
Is anyone else seeing these problems? Erratic behavior, probe functions returning before the final probe is finished, errors if not in MDI mode?
It would be helpful to know the problems I am seeing are Gscreen related. Is anyone using probe_screen with Gscreen?
Anyone have clues about why I am getting MDI mode errors?
Here is a patch file for probe_screen.py is anyone is interested in the code.