Skip to content

Commit

Permalink
fix: actually check navx connection
Browse files Browse the repository at this point in the history
  • Loading branch information
mimizh2418 committed Jan 9, 2024
1 parent dfa6ce2 commit b5c0971
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public void updateInputs(GyroIOInputs inputs) {
double lastTime = inputs.time;
Rotation2d angle = navx.getRotation2d();
inputs.time = Timer.getFPGATimestamp();
inputs.connected = true;
inputs.connected = navx.isConnected();
inputs.yawPosition = angle;
inputs.yawVelocityRadPerSec = (angle.minus(lastAngle).getRadians())/(inputs.time - lastTime);
lastAngle = angle;
Expand Down

0 comments on commit b5c0971

Please sign in to comment.