Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce boilerplate for advantagekit logging #75

Merged
merged 3 commits into from
Apr 5, 2024
Merged

Reduce boilerplate for advantagekit logging #75

merged 3 commits into from
Apr 5, 2024

Conversation

amb2127
Copy link
Collaborator

@amb2127 amb2127 commented Apr 5, 2024

Instead of manually logging position, velocity, current, voltage, etc. for every motor in each subsystem, I've opted to switching over to keeping the shared desired fields in a MotorInputs data class that implements StructSerializable, packaged with a helper class to automatically extract the information from a given TalonFX object. This should significantly reduce boilerplate while keeping everything we want to have logged packaged nicely.

@amb2127 amb2127 requested a review from dlpond917 April 5, 2024 03:15
Copy link
Collaborator

@dlpond917 dlpond917 left a comment

Choose a reason for hiding this comment

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

Love to see all of the repetitive code cleaned out! Really good idea!

@amb2127 amb2127 merged commit c1a581e into main Apr 5, 2024
1 check passed
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