Refactoring drive train swerve module to batch update signals and use…#32
Open
Kython89 wants to merge 1 commit into
Open
Refactoring drive train swerve module to batch update signals and use…#32Kython89 wants to merge 1 commit into
Kython89 wants to merge 1 commit into
Conversation
akrose6114
requested changes
Mar 8, 2024
akrose6114
left a comment
There was a problem hiding this comment.
It took me a minute to find the creation of the new values in the update func but i think this makes sense and is an improvement.
We will want I think to declare/initialize all of the values we use in update in the init function so that they have an allocation and don't cause a crash if read before they are instantiated in update function.
| def distance(self): | ||
| return wpimath.units.inchesToMeters(self.driveMotor.get_position().value * self.wheel_circumference) | ||
|
|
||
|
|
There was a problem hiding this comment.
Dexter: should be self.state_drive_pos
| def get_state(self): | ||
| return SwerveModuleState( | ||
| speed=wpimath.units.inchesToMeters(self.driveMotor.get_velocity().value * (self.wheel_circumference)), | ||
| speed=wpimath.units.inchesToMeters(state_drive_vel * (self.wheel_circumference)), |
57916c2 to
fdfcecf
Compare
fdfcecf to
5e6fe88
Compare
… latency comp Fix paths with events on C++ (#603)
5e6fe88 to
e7bae99
Compare
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.
… latency comp
Docs driving these changes are here. Untested on an actual robot.
https://v6.docs.ctr-electronics.com/en/stable/docs/api-reference/api-usage/status-signals.html