hal: Update kinematics to getter/setter - #4288
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This updates the kinematics components to getter/setter. Most of this is very straight forward.
(there appear to be more kinematics files in hal/components, like matrixkins, will be done later)
There are several kinematics that have pins/params with initial values. They are created in a loop and the initial values are now taken from a few static const arrays so the loop can easily address and set the initial value for the specific pin/param. Having a few bytes of added .rodata should be no problem.
A few kinematics modules have some fixes to add
staticto some local variables like the component ID and the haldata pointer. These are exclusively local to the module. Some error checking in rtapi_app_main() was improved and streamlined when it could be easily done without needing to go into rewrite/refactor mode.A few obvious and easy to fix cases of multiple reads of a pin/param were altered into cached reads.
Corexykins had all its completely unused pins structure and halmem allocation removed (all from copy/paste coding). Also unused headers were removed.