Imported 2025 WPI lib

changes basemagnitudeunit
added old vendor deps
-not functional on robot
This commit is contained in:
Shatcar
2025-11-04 17:50:14 -07:00
parent 1bf11ace87
commit 9586a70df4
20 changed files with 409 additions and 259 deletions
@@ -150,7 +150,7 @@ public class SwerveModule extends SubsystemBase {
public Rotation2d getAngle() {
// * Note: This assumes that the CANCoders are setup with the default feedback coefficient and the sensor value reports degrees.
// return Rotation2d.fromDegrees(encoder.getAbsolutePosition());
return Rotation2d.fromRotations(encoder.getPosition().getValue());
return Rotation2d.fromRotations(encoder.getPosition().getValue().baseUnitMagnitude());
}
public double getAngularVel() {
@@ -184,9 +184,7 @@ public class SwerveModule extends SubsystemBase {
*/
public SwerveModuleState getState() {
return new SwerveModuleState(
Units.inchesToMeters(driveMotor.getVelocity().getValue() *
SwerveDriveConstants.Conversions.INCHES_PER_WHEEL_REV *
SwerveDriveConstants.Conversions.WHEEL_REV_PER_MOTOR_REV),
Units.inchesToMeters(driveMotor.getVelocity().getValue().baseUnitMagnitude() * SwerveDriveConstants.Conversions.INCHES_PER_WHEEL_REV * SwerveDriveConstants.Conversions.WHEEL_REV_PER_MOTOR_REV),
getAngle()
);
}