Can MDI_COMMAND entries be explicitly numbered?

More
1 year 7 months ago #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 to join the conversation.

More
1 year 7 months ago #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:

 

Attachment not found



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').

Please Log in to join the conversation.

More
1 year 7 months ago #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 to join the conversation.

More
1 year 6 months ago #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 to join the conversation.

More
1 year 6 months ago #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).

Please Log in to join the conversation.

Time to create page: 0.085 seconds
Powered by Kunena Forum