Skip to content

Commit

Permalink
fix: use Rotation2d factory methods
Browse files Browse the repository at this point in the history
  • Loading branch information
mimizh2418 committed Jan 18, 2024
1 parent de9708c commit c27ed0a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ public void updateInputs(ModuleIOInputs inputs) {
inputs.driveAppliedVolts = driveAppliedVolts;
inputs.driveCurrentAmps = Math.abs(driveSim.getCurrentDrawAmps());

inputs.turnAbsolutePosition = new Rotation2d(turnSim.getAngularPositionRad());
inputs.turnPosition = new Rotation2d(turnSim.getAngularPositionRad());
inputs.turnAbsolutePosition = Rotation2d.fromRadians(turnSim.getAngularPositionRad());
inputs.turnPosition = Rotation2d.fromRadians(turnSim.getAngularPositionRad());
inputs.turnVelocityRadPerSec = turnSim.getAngularVelocityRadPerSec();
inputs.turnAppliedVolts = turnAppliedVolts;
inputs.turnCurrentAmps = Math.abs(turnSim.getCurrentDrawAmps());
Expand Down

0 comments on commit c27ed0a

Please sign in to comment.