Skip to content

Commit

Permalink
Spotless
Browse files Browse the repository at this point in the history
  • Loading branch information
frc1987 committed Apr 3, 2024
1 parent 0e22765 commit c2f2b9e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
14 changes: 8 additions & 6 deletions src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -613,15 +613,16 @@ public Pose2d getPose() {

public boolean shouldRejectLL3G(final Limelight.PoseEstimate botPose) {
if (botPose.tagCount < 2) {
return true;}
return true;
}

if (SHOOTER.isFeeding()) {
return true;
}
if (SHOOTER.isFeeding()) {
return true;
}
// if (botPose.tagCount == 1 && botPose.rawFiducials[0].ambiguity > 0.9) {
// return true;
// }
if (botPose.tagCount == 2 && botPose.avgTagDist > 4.0) { //4.0
if (botPose.tagCount == 2 && botPose.avgTagDist > 4.0) { // 4.0
return true;
}
// Reject a pose outside of the field.
Expand Down Expand Up @@ -791,7 +792,8 @@ private double calculateConfidence(Limelight.PoseEstimate botPose) {
// final double botPoseToPoseDistance =
// botPose.pose.getTranslation().getDistance(DRIVETRAIN.getPose().getTranslation());
final double speakerReference = Util.speakerTagCount(botPose.rawFiducials);
final double distanceWeight = Math.pow(botPose.avgTagDist / Constants.Vision.MAX_DISTANCE_SCALING, 2);
final double distanceWeight =
Math.pow(botPose.avgTagDist / Constants.Vision.MAX_DISTANCE_SCALING, 2);
// System.out.println(distanceWeight);
if (botPose.tagCount > 2) {
return (0.7 / speakerReference) + distanceWeight;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

public class InstantShoot extends Command {

private static final double SHOT_DEBOUNCE_TIME = 0.08; //0.06
private static final double SHOT_DEBOUNCE_TIME = 0.08; // 0.06

private final Shooter m_shooter;
private Debouncer m_shotDebouncer;
Expand Down

0 comments on commit c2f2b9e

Please sign in to comment.