Skip to content

Parameter handling fixes#4

Open
the-programmer wants to merge 2 commits into
IndustrialBrains:mainfrom
the-programmer:main
Open

Parameter handling fixes#4
the-programmer wants to merge 2 commits into
IndustrialBrains:mainfrom
the-programmer:main

Conversation

@the-programmer
Copy link
Copy Markdown
Collaborator

Made a new way to load the parameters.

This unit "trusts" the data that is stored PERSISTENT part based on bLoadedFromPersistent.
If this is set to TRUE, the code uses the value stored in the PERSISTENT memory.
If it is set to FALSE, the value from the CSV is used (if found).

This behavior can be changed via ForceCsv.txt and ForceFactory.txt.

Second, I made CmdAddParameter more strict.
Initially it only checked the number. Now it checks the number and the name in order to prevent indexes from being re-used.

Tim Bots added 2 commits December 19, 2022 11:05
Copy link
Copy Markdown
Contributor

@JustusRijke JustusRijke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Tim,

Great work, thanks!

Udt_Parameter string lengths were shortened to make sure CSV lines are less than 256 characters. The pull requests reverts this change. If the parameter has some long field strings (for example with nasty floats like -1.7976931348623158e307 and long descriptions) the CSV file will be corrupt.
Could you take a look at that? Simple solution is to change UDT_Parameter again, more futureproof would be to allow longer CSV record strings.

Next step (on our side) would be to combine the 2 parameter file handler implementations with overlapping functionality (FB_ParameterFileHandler and FB_ParameterSelector) into 1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants