Closed ZLLentz closed 1 year ago
I'm very happy with the API I settled on here following the discussions on the linked issue. This remains a draft because the code is completely untested.
A bit of a snag here: method calls in TwinCAT3 cannot have default arguments. Next week I'll find some other way to make this intuitive to use.
I'm going to merge this and move on to the next item, which is making a tag so we can try this in TMO today.
Description
Create
FB_StateSetupHelper
, a tool to make it less tedious and less error prone to set up large arrays of position states. In short, this lets you set defaults for your state fields and then override them on on a state-by-state basis.Example usage from readme:
Motivation and Context
Setting up position states is tedious and error-prone. closes #176
How Has This Been Tested?
I added unit tests to cover the new features.
Where Has This Been Documented?
I included a docstring and updated the readme.
Pre-merge checklist
Always Newest
version (Library, *
)pre-commit
or ranpre-commit run --all-files