-
Notifications
You must be signed in to change notification settings - Fork 1.2k
gmoccapy/hal_bridge -allow hal_bridge to call macros in gmoccapy #3528
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This is a proof of concept to allow 3rd party (hal_bridge) to call macros. The macros are run from Gmoccapy so no timing problems should occur and and pre checks or post changes can be covered. There needs to be agreement on where to put macro definitions in the INI. Gmoccapy puts them under [MACROS], iniinfo under [DISPLAY] python ZMQ module package must be available for this to work
|
Sorry I haven't managed yet to set up my computer after the move... |
|
No problem - I moved a few months ago - ya what a pain :) @zz912 this might be interest to you too. |
I've looked at this PR in the past and didn't understand what it's exactly good for.
|
|
Thanks for looking This is a different use of ZMQ then the previous pull request. This uses GSTAT between the ZMQ messages and the GUI.
MDI commands would be easy to add. Halbridge already looks for them. One would only need to add code to gmoccapy to run them. |
|
I'll try to find time tonight to add mdi commands to make it worth your while 😀 |
|
O still dont understand what this PR is good for. Could you give example, how should I test this PR? For my understanding. Mayby this PR is over my programing skills. |
|
Look here: Similar to halui but without the timing and mode change problems. |
|
To be clear, this code only covers running macros. Jog rate and increment rate are not coded.l yet. |
|
So if I understand correctly:
I think this component would deserve its own page like halui: Will there be some common HAL pins in "bridge" that will always exist? What is your goal?
I would say it's a lot of work to rewrite everything, but it would unify all GUIs a lot. Next, there's the question of whether it wouldn't be possible to unify macros and halui.mdi-command. now: There would only be bridge.macro-cmd with some switch whether the GUI should create a button for this macro. I sometimes use halui.mdi-commands that I don't want the operator to be able to run.
I need to run halui.mdi-commands from manual mode. This is ATC control. Which GUIs use bridges? |
|
@Sigma1912 this might be interest to you too. |
|
Qtdragon now can use hal bridge. Seems to work fine. It also allows external axis selection and reports jog rate and jog increment. I didn't quite get the mdi command code in gmoccapy working quite night. Probably tonight I'll finish it and push to this branch. |
|
As somebody who would like to keep Gtk and Qt based guis separate I'm somewhat weary of requiring the QT library just so I can have a separate component give me functionality that I could have by creating the pins in Gmoccapy in the first place. |
|
This does not add qt libraries to gmoccapy. The idea is to have a more universal fix for the ongoing problems of having every GUI need different pins for the same thing. Also it allows programs to share states that are otherwise not available. For instance HALUI has no idea of jog rate, jog increment or axis selection of the GUI and you can not get that info from linuxcnc's status because there is no such thing. Also for instance It might be nice for a glade vcp panel to know what the current jog rate and selected acts is. This would be available thru hal_glib (aka GSTAT) |
legacy 'MDI_COMMAND' was not recorded properly
|
Ok this adds INI MDI command running in Gmoccapy (thru hal bridge), |
While this statement is not wrong it is also not really true either. You know as well as I do that this is part of a larger strategy to remove as many of gmoccapy hal pins as possible and replace them with a service shared with your QT based guis. I'm not the maintainer of Gmoccapy, so it clearly is not my decision to make but I think it should be clear that this 'unification' will make ALL affected guis dependent on QT. |
|
You don't have to remove Gmoccapy's pins. Might want to in the long run, but it's not required. While I understand not wanting (as a general rule) to mix gtk/qtin gladevcp/gmoccapy, this idea that qt cannot be used in any way, in any part of linuxcnc that gladevcp code connects is just too hard of a line. irrespective of all that, how about we try this code and see if there is any technical problem with the idea. |
|
Hi Chriss,
I think you're missing the concept of what you're trying to do. Rewriting Python2 to Python3 was a lot of work, but it was done. I was involved as a tester here. I'm not the one to decide. If we remove Gmoccapy's pins and replace them with bridge, I have no problem with that. It's already annoying when integrating Gmoccapy, I have to connect something to gmoccapy pin and something to halui pin. I like the document: Make a PR where you propose the future of GUI in LCNC. It will be easy to follow future developments. Zdenek |
Yes I agree, it's a hurdle for users. I actually wanted to just add ZMQ (through a python instance) into HALUI. It would have been the easiest integration for users. I just don't know anything about setting compiler/linker flags to work on that code. Maybe if I got some help, then I could remove hal bridge.
I understand, and will if/when it's all confirmed and figured out, but right now we are still 'hammering out' the details (and testing) |
|
So I went in a different direction and added the zmq messages to halui to be more universal. They will load the respective gui and a separate simulated control panel. |
This is a proof of concept to allow 3rd party (hal_bridge) to call macros. The macros are run from Gmoccapy so no timing problems should occur and and pre checks or post changes can be covered.
There needs to be agreement on where to put macro definitions in the INI. Gmoccapy puts them under [MACROS], iniinfo under [DISPLAY] python ZMQ module package must be available for this to work