-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Currently, SwerveModule.periodic() only updates the turn voltage. The drive voltage is only updated when SwerveModule.setSpeed() is called. Since drivetrain code might not call setSpeed() regularly (e.g. if nothing is changing the speed), the drive pid controller won't be called to determine the correct voltage to use to achieve the most recently requested speed. Seems like the code in setSpeed() should be moved into periodic() and setSpeed() should just save the desired speed in a field for use by periodic().
This is almost definitely the cause of the robot drifting while it's supposed to be stopped in the middle of an auto routine.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working