NGCGui for Qtvcp with autoload feature(files attached)
03 Aug 2022 19:03 #248960
by Eyecon
NGCGui for Qtvcp with autoload feature(files attached) was created by Eyecon
I modified the existing ncggui implementation for qtvcp to include a simple function that loads INI configured entries for ngcgui scripts and auto load them as tabs when starting Linuxcnc any qtvcp interfaces that also loads the ncggui pannel. It's not as fancy as the pyngcgui in that it doesn't have custom configuration parameters and doesn't load the preamble/post files automatically but at least I can get my conversational scripts to autoload on my instance of qtdragon. I also modified the widget UI and handler to include checkbox to prompt for a file save. The current implementation always pops-up a file manager dialog when finalizing the features which is not always needed if auto-sending to the running instance of Linuxcnc.
To use the modified code, the files needs to be copied to the appropriate directory(typically /usr/lib/python3/dist-packages/qtvcp/lib/qt_ngcgui for a package install of linuxcnc) and the following entries need to be added to the ini:
NGCGUI_SUBFILE : name of the NGCGUI file (including extension) to be automatically loaded
NGCGUI_SUBFILE_PATH : path of the directory where the files can be found, relative to the root of the launched Linuxcnc INI
Each NGCGUI_SUBFILE entry will create a tab and load the appropriate NGCGui file.
Error handling is poorly implemented so use at your own risk
To use the modified code, the files needs to be copied to the appropriate directory(typically /usr/lib/python3/dist-packages/qtvcp/lib/qt_ngcgui for a package install of linuxcnc) and the following entries need to be added to the ini:
NGCGUI_SUBFILE : name of the NGCGUI file (including extension) to be automatically loaded
NGCGUI_SUBFILE_PATH : path of the directory where the files can be found, relative to the root of the launched Linuxcnc INI
Each NGCGUI_SUBFILE entry will create a tab and load the appropriate NGCGui file.
Error handling is poorly implemented so use at your own risk
The following user(s) said Thank You: andypugh, tommylight
Please Log in or Create an account to join the conversation.
04 Aug 2022 02:00 #248996
by cmorley
Replied by cmorley on topic NGCGui for Qtvcp with autoload feature(files attached)
I integrated your code into master.
Thanks for sharing it.
Thanks for sharing it.
Please Log in or Create an account to join the conversation.
04 Aug 2022 02:34 #248998
by Eyecon
Replied by Eyecon on topic NGCGui for Qtvcp with autoload feature(files attached)
That’s awesome, thank you so much!…saves me setting up a branch and all that with git!
Please Log in or Create an account to join the conversation.
04 Aug 2022 04:16 #249000
by Eyecon
Replied by Eyecon on topic NGCGui for Qtvcp with autoload feature(files attached)
Not sure the changes work. I don't exactly understand how the Info class works in qtvcp but I tried using NGC_SUB_PATH and NGC_SUB in the ini and the tabs are not getting created. Also not sure how the Log class works so I don't know where to find the log messages.
Please Log in or Create an account to join the conversation.
04 Aug 2022 04:49 #249001
by cmorley
Replied by cmorley on topic NGCGui for Qtvcp with autoload feature(files attached)
That's what I get for not testing properly.
Please pull again - it should be fixed now.
Please pull again - it should be fixed now.
Please Log in or Create an account to join the conversation.
04 Aug 2022 04:51 #249002
by Eyecon
Replied by Eyecon on topic NGCGui for Qtvcp with autoload feature(files attached)
I guess it was an issue with the qt_istat file, I literally just figured the qtvcp classes and found the issue as I saw your message, thank for the quick fix !!
Please Log in or Create an account to join the conversation.
04 Aug 2022 04:53 #249003
by cmorley
Replied by cmorley on topic NGCGui for Qtvcp with autoload feature(files attached)
add -d to the INI
DISPLAY = qtvcp -d qtdragon
then running from the terminal will show the logs output.
DISPLAY = qtvcp -d qtdragon
then running from the terminal will show the logs output.
The following user(s) said Thank You: Eyecon
Please Log in or Create an account to join the conversation.
04 Aug 2022 13:35 #249040
by Eyecon
Replied by Eyecon on topic NGCGui for Qtvcp with autoload feature(files attached)
yes thank you, I got my self familiar with the qtvcp library so I'm not guessing what the code is trying to do
I just did a pull a rebuilt/installed the packages and they work beautifully!
Now if I can only figure out what qtvcp is doing to cause the segmentation fault on exit and why it seems to bog down the system!
I just did a pull a rebuilt/installed the packages and they work beautifully!
Now if I can only figure out what qtvcp is doing to cause the segmentation fault on exit and why it seems to bog down the system!
Please Log in or Create an account to join the conversation.
08 Aug 2022 20:15 #249366
by cmorley
Replied by cmorley on topic NGCGui for Qtvcp with autoload feature(files attached)
The ending segmentation fault might be a known problem for pyqt programs.
docs.huihoo.com/pyqt/PyQt5/gotchas.html
stackoverflow.com/questions/39107846/seg...-pyqt5-but-not-pyqt4
I can change the behavior by changing exit code functions, but not fix it yet.
docs.huihoo.com/pyqt/PyQt5/gotchas.html
stackoverflow.com/questions/39107846/seg...-pyqt5-but-not-pyqt4
I can change the behavior by changing exit code functions, but not fix it yet.
The following user(s) said Thank You: Eyecon
Please Log in or Create an account to join the conversation.
08 Aug 2022 20:19 #249367
by Eyecon
Replied by Eyecon on topic NGCGui for Qtvcp with autoload feature(files attached)
Thank you that would be great although my bigger concern is why my Mesa cards keep timing out when I’m using qtdragon. I that committed a few changes to qtvcp over the last couple of feats related to error handling but I haven’t had the chance to do a pull and reinstall yet. Did you by any chance get the opportunity to test this behaviour with any of the Mesa cards?
Please Log in or Create an account to join the conversation.
Moderators: cmorley
Time to create page: 0.089 seconds