-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Gmoccapy - change spindle => spindle_0 in *.ini files #3488
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
base: master
Are you sure you want to change the base?
Conversation
Why did you need to change all the Min and Max Spindle stuff? In gmoccapy.Py you introduced a lot of print statements, why? Norbert |
[Zdeněk]
[Norbert]
For that see #3238, also my working branch https://github.com/hansu/linuxcnc/commits/gmoccapy-3-5-1-ini-values especially hansu@e0359dc Sorry this got stuck for a while in my pipeline. |
To Hans: Can you please explain to everyone what QTVCP.QT_ISTAT is and what it is for? It will help me explain what, why and how I did it, or edit my PR. I thought QTVCP.QT_ISTAT was something new, so I adapted everything to it so that it doesn't throw error messages. When do you plan to merge your gmoccapy-3-5-1-ini-values branch? Or should I close this PR and you edit your branch inspired by this PR? [Norbert]
I introduced a lot of print statements in src/emc/usr_intf/pncconf/build_INI.py not in gmoccapy.py It is comments from your file https://github.com/LinuxCNC/linuxcnc/blob/master/configs/sim/gmoccapy/gmoccapy_4_axis.ini Zdeněk |
Because the logger from QTVCP is used here and it uses this module, here is a bit about that: You can add additional values with "MIN_SPINDLE_0_SPEED" and so on to suppress these warnings.
I think at some time in the autumn this year. It is a bit work because I have to edit a lot of INI files. And it also touches some other GUIs.
I think it would be the best if you wait until my branch is merged and then rebase your branch. [Norbert]
It still works, but only throws warning since gmoccapy uses the qtvcp logger (#2323) |
I will wait for the release of 3.5.1 |
3.5.1 is ready, but the INI value stuff will not make it into 3.5.1 unfortunately even though the branch name suggests that |
I don't understand why a logger module autonomously throws errors about ini file entries. Wouldn't we use the logger module to log errors about entries missing for gmoccapy? |
Not sure if it is such a great idea to mix qtvcp into gladevcp: https://github.com/hansu/linuxcnc/blob/master/lib/python/gladevcp/core.py#L13 |
[Sigma]
The situation is not as simple as it seems. I think Hans is doing a good job trying to unify the INI parameters of all GUIs. Unfortunately, this creates problems that need to be solved. Now, we have 5 problematic INI parameters: In version 2.7 and older LCNC could only handle one spindle. In version 2.8 and newer LCNC could handle N spindles. In Gmoccapy (and also in other GUIs) only the most necessary things were rewritten to make it work. "spindle" was rewritten to the first spindle "spindle_0". Unfortunately, the names of the parameters in the INI files related to spindles were evaluated as not necessary to change. Then when Hans did an ISTAT check, the check wanted parameter names with "spindle_0". With this Pull Request I wanted to solve only this unification. When I was dealing with this issue I found out:
So we use the logger module to log errors about 3 entries missing for gmoccapy. |
LinuxCNC is already the Tower of Babel. |
Can you explain why? Qtvcp and Gladevcp also both use hal_glib, should we recreate a qthal_ glib too? I think people are getting upset about a name. The idea is to get less duplication of code. Hans and I have discussed bit about this. Thete are plenty of ways to improve the ini error reporting. I beleive the first thing tp go is to get qtvcp and gladevcp/gmoccapy to use the same core ini reader. But the code i added that pulled Istat in was for gladevcp panels not Gmoccapy. |
Thanks for your comments. |
As I said there is work we can do about error/warning messages. There is little sense in creating two modules that do approximately exactly the same thing. Have you looked at qt_istat.py? There are no PyQt libraries used in it - don''t get hung up on a name. To sumarize: -Don't get too hung up in a name (and we could surely change that name anyways) -The ini/action changes were made for Gladevcp not Gmoccapy, but since Gmoccapy uses Gladevcp, we must work around them - probably better to work with them. |
I studied:
I agree with parse/qualify common INI settings in a common module. BUT Gmoccapy uses the same parameters from the INI file and the same parameters can be set in the setup page. These are then saved in the *.pref file. So we have a duplicate source of some parameters. What should the future of Gmoccapy be?
I think qt_istat.py could be renamed to istat.py and moved here: qt in name make me unhappy too. |
Because it's a step size for all spindles like the [DISPLAY] INCREMENTS is for all linear axes.
Yeah some. But that's a Gmoccapy-only thing
No, we don't want this |
I don't think it's the same. Many machines have a main spindle with a range of 50 - 1500 rpm and an auxiliary spindle with a range of 1000 - 100,000 rpm. What increment would you choose here? To make sense, the increment would have to be in percent. However, I still can't imagine using this parameter. (This is because I don't know the other GUIs)
I am interested ONLY about Gmoccapy.
For the standardization of LCNC it would be ideal to remove duplicate parameters from the setup page. Then it would be possible to debug LinuxCNC with all GUIs the same. But I think Norbert will not like it. |
I am a friend of unifying code stuff. IMHO mixing QT and GTK Stuff is not the way to go. |
So the problem is the name then? qt_istat.py has no PyQt libraries in it. |
It's not just the name. It's also location:
It's also about paths used in the code (eg 'qt_istat.py'):
and function names:
comments:
Code that is to be shared by Qt AND non-QT based GUIs should not
Don't get me wrong, I realize that you have put tremendous amounts of time and effort into the Gui section of LinuxCNC. It has CMorley written all over but with this being in the source code we need to pay extra attention to maintainability for future developers. Most of the time we like to just make things work and not so much cleaning things up. Thank you. |
I would like to propose that the debate regarding ISTAT be moved somewhere else. I have also created an Issue regarding duplicate parameters in Gmoccapy. |
RIP installation
LCNC 2.10
GUI Gmoccapy
How did it start?
I had a clean configuration from PncConf and after starting LCNC it gave me these error messages:
So I edited spindle => spindle_0 in the INI files.
The problem was that the QT_ISTAT error messages disappeared, but the Gmoccapy error messages appeared.
So I had to edit Gmoccapy to require spindle_0.
Finally, I edited PncConf to generate spindle_0 for Gmoccapy.
While I was playing with PncConf, I added more comments to the generated INI files.