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
@@ -79,14 +79,14 @@ public class Intake extends SubsystemBase {
public void stopArmMotor() {
pivotMotor.set(0);
}
j
public void stop() {
intakeMotor.set(0);
pivotMotor.set(0);
}
public double getArmPos() {
return pivotMotor.getPosition().getValue();
return pivotMotor.getPosition().getValue().baseUnitMagnitude();
}
public void resetArmPosition() {
@@ -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()
);
}