This has errors lol

This commit is contained in:
Ryan Manley
2022-01-18 19:53:14 -07:00
parent 7bb6d2f845
commit 93f83986e5
3 changed files with 45 additions and 34 deletions
@@ -93,4 +93,14 @@ public class SwerveModule extends SubsystemBase {
double feetPerSecond = Units.metersToFeet(state.speedMetersPerSecond);
driveMotor.set(angleMotor.get() + feetPerSecond / SwerveDriveConstants.SPEED_FEET_PER_SECOND_AT_FULL_POWER);
}
/**
* Returns the current state of the module.
*
* @return The current state of the module.
*/
public SwerveModuleState getState() {
return new SwerveModuleState(driveMotor.getSelectedSensorVelocity(), new Rotation2d(canCoder.getPosition()));
}
}