Skip to content

Commit

Permalink
Speakre to Speaker, for the Nth time
Browse files Browse the repository at this point in the history
  • Loading branch information
2491NoMythic committed Mar 21, 2024
1 parent f43403c commit 46d3281
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/frc/robot/subsystems/DrivetrainSubsystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ public double calculateSpeakerAngle(){
deltaX = Math.abs(dtvalues.getX() - Field.RED_SPEAKER_X);
}
speakerDist = Math.sqrt(Math.pow(deltaX, 2) + Math.pow(deltaY, 2));
// SmartDashboard.putNumber("dist to speakre", speakerDist);
// SmartDashboard.putNumber("dist to speaker", speakerDist);

// RobotState.getInstance().ShooterInRange = speakerDist<Field.MAX_SHOOTING_DISTANCE;

Expand Down Expand Up @@ -334,7 +334,7 @@ public double calculateSpeakerAngleMoving(){
}
deltaY = Math.abs(dtvalues.getY() - Field.SPEAKER_Y);
speakerDist = Math.sqrt(Math.pow(deltaX, 2) + Math.pow(deltaY, 2));
// SmartDashboard.putNumber("dist to speakre", speakerDist);
// SmartDashboard.putNumber("dist to speaker", speakerDist);

Rotation2d unadjustedAngle = Rotation2d.fromRadians(Math.asin(deltaX/speakerDist));
double totalDistToSpeaker = Math.sqrt(Math.pow(Field.SPEAKER_Z-ShooterConstants.SHOOTER_HEIGHT, 2) + Math.pow(speakerDist, 2));
Expand Down

0 comments on commit 46d3281

Please sign in to comment.