Can MDI_COMMAND entries be explicitly numbered?

More
26 Mar 2025 14:53 #324967 by pgf
I suspect the answer to the Subject's question is "no", since I've found no reference anywhere (except on a very old sourceforge thread) to "MDI_COMMAND0", "MDI_COMMAND1", etc.

But is there any reason the HALUI section, and the code that reads it, couldn't be enhanced to allow that?  It would be nice not to have to worry about ordering.  It would also make the .ini file more "standards compliant" -- it's highly unusual to have multiple values with the same key in an ini file.  The crudini command, for example, will toss all but the last such entry.   

Please Log in or Create an account to join the conversation.

More
26 Mar 2025 18:40 #324996 by Aciera
I'm not aware of an optional explicit numbering.
This seems to be the section in halui.cc that parses the MDI_COMMAND entries in the ini file:

 

It basically adds the commands to an array in the order they appear in the [HALUI] section. I guess it would be possible to parse each entry for the number and place it in the appropriate element of the array but I'm not sure if it's really worth the effort as there are other keys that can occur multiple times (eg 'REMAP' or 'HALFILE').
Attachments:

Please Log in or Create an account to join the conversation.

More
26 Mar 2025 22:51 #325013 by cmorley
Doesn't help you but in the latest QtDragon, we added:

# new way: 'MDI_COMMAND_SSS = XXXX' (SSS being any string)
# order of commands doesn't matter in the INI

Just for the reason you mention.

Please Log in or Create an account to join the conversation.

More
05 Apr 2025 14:28 #325760 by pgf
I seem to have forgotten to subscribe to this topic, so I've missed the replies until today. Sorry about that.

@Aciera -- not sure I understand the bit about "...not sure if it's really worth the effort as there are other keys that can occur multiple times (eg 'REMAP' or 'HALFILE')". How does that effect whether MDI_COMMANDS can be referenced explicitly?

@cmorley -- I'm surprised that this can be done on a UI-by-UI basis. But there's an awful lot I don't understand about the underpinnings of LinuxCNC.

Please Log in or Create an account to join the conversation.

More
05 Apr 2025 17:06 - 05 Apr 2025 17:11 #325770 by Aciera
I wrote that because of your argument that referencing MDI_COMMANDS explicitly would make the ini file "more standards compliant".

Ideally every GUI should provide it's own hal pins to handle the functionality of 'halui' (which is actually a separate user interface).
Last edit: 05 Apr 2025 17:11 by Aciera.
The following user(s) said Thank You: pgf

Please Log in or Create an account to join the conversation.

Time to create page: 0.183 seconds
Powered by Kunena Forum