Mesa Configuration Tool

More
19 Sep 2022 11:48 #252336 by HansU
Replied by HansU on topic Mesa Configuration Tool

I changed the way I check for LinuxCNC version that should be language agnostic so if you can test that on your PC with the German locale and let me know if you get the correct LinuxCNC version.

This works now :)

What section would key value pairs be in that are not LinuxCNC specific? BACKLASH is a joint specification which could be added to the tool easy enough.

In the display section e.g. there so many possibilities to customize the GUI which makes no sense to have this all in your config tool.
The config tool should provide a quick start to get the basic hardware running. Fine tuning can be done later.
Sure you can forget about the tool when you created your initial config. But would be nice to be able to make changes later with this tool without discarding all manual changes. For the HAL file I could imagine a special section of the file that is kept on re-generating. Something you know from other code-generators.

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

More
19 Sep 2022 13:23 #252340 by JT
Replied by JT on topic Mesa Configuration Tool
The custom.hal file is not changed by the tool when saving, it only creates it if requested and not in the configuration directory.

I'll have to ponder how to only change the values used by the tool... I do think it is possible and would be another huge benefit for using the Mesa Configuration Tool.

JT

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

More
19 Sep 2022 16:02 #252351 by HansU
Replied by HansU on topic Mesa Configuration Tool

The custom.hal file is not changed by the tool when saving, it only creates it if requested and not in the configuration directory.


Oh yes of course. I forgot about that file.

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

More
19 Sep 2022 20:14 #252363 by JT
Replied by JT on topic Mesa Configuration Tool
PCW explained that to me but I forget the exact reason... I think it has something to do with pulse timing but may be wrong. And it does work without it but not as good.

JT

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

More
21 Sep 2022 13:05 #252503 by JT
Replied by JT on topic Mesa Configuration Tool

Furthermore it would be good if unknown key value pairs (like "BACKLASH = 0.01") are not removed when generating the config. Maybe you can add a special section for that? Or remember the lines which didn't correspond to a supported value and print them when generating? This would also allow to keep comments.
 

Based on your suggestion I've created an ini branch where I'm completely changing how I deal with the ini file.

I removed all the items that the tool uses and placed them in a hidden file .mesact.conf. This is about 1/2 done now. This will unclutter the configname.ini file.

Next I'll read in the configname.ini file and use the configparser to only update the values from my tool instead of just writing a new file like currently I'm doing now.

The configname.hal, io.hal and ss.hal files will still be created each time and as before the custom.hal, shutdown.hal and postgui.hal files will not be touched once they are created.

This is a huge change in how I deal with the files so I thought it best to create a branch to work out the details and not break the master branch while working on the change.

JT

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

More
21 Sep 2022 16:39 #252523 by HansU
Replied by HansU on topic Mesa Configuration Tool
This sounds nice :)
Is the .mesact.conf file needed to edit the config with mesact or is it created when loading an INI file?

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

More
21 Sep 2022 23:04 #252539 by JT
Replied by JT on topic Mesa Configuration Tool
Geez right in the middle of replying and the power went out... had to fire up the generator.

The .mesact.conf file is created when you build the configuration and is used to setup the tool when you load the ini. Not sure exactly how I will merge old and new configurations yet but that must be addressed.

I have tested my code and it doesn't change anything in the existing ini file that is added by a user so that is good.

JT

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

More
22 Sep 2022 14:56 #252572 by JT
Replied by JT on topic Mesa Configuration Tool
I have run into an issue with the python3 configparser, it does not allow duplicate keys and the [HAL] section can have duplicate keys for HALFILE. So I'll have to figure out how to get around that...

JT

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

More
22 Sep 2022 18:10 #252577 by HansU
Replied by HansU on topic Mesa Configuration Tool

The .mesact.conf file is created when you build the configuration and is used to setup the tool when you load the ini. Not sure exactly how I will merge old and new configurations yet but that must be addressed.

 

Hmm but I saw it as a big advantage that your tool can open a config without need for additional files.

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

More
22 Sep 2022 22:23 #252591 by JT
Replied by JT on topic Mesa Configuration Tool

The .mesact.conf file is created when you build the configuration and is used to setup the tool when you load the ini. Not sure exactly how I will merge old and new configurations yet but that must be addressed.

 
Hmm but I saw it as a big advantage that your tool can open a config without need for additional files.
 

That is an advantage that you can share one file to create the whole configuration... I have solved the puzzle for the [HAL] duplicate keys issue. The disadvantage is the ini file gets very long... gotta ponder which way to go now.

JT

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

Moderators: PCWjmelson
Time to create page: 0.109 seconds
Powered by Kunena Forum