Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Major upgrades #88

Closed
wants to merge 16 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
podium shot updated
  • Loading branch information
2491NoMythic committed Feb 28, 2024
commit 873584e4791899509e22d9de044e1f99dd2ed766
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/commands/AimShooter.java
Original file line number Diff line number Diff line change
@@ -37,7 +37,7 @@ public void execute() {
angleShooterSubsystem.setDesiredShooterAngle(Field.SUBWOOFER_ANGLE);
} else {
if (StageAngleSupplier.getAsBoolean()) {
angleShooterSubsystem.setDesiredShooterAngle(Field.STAGE_ANGLE);
angleShooterSubsystem.setDesiredShooterAngle(Field.PODIUM_ANGLE);
} else {
if (POVSupplier.getAsDouble() == 90 || POVSupplier.getAsDouble() == 45 || POVSupplier.getAsDouble() == 135) {
angleShooterSubsystem.setDesiredShooterAngle(SmartDashboard.getNumber("amp angle", Field.AMPLIFIER_ANGLE)/*Field.AMPLIFIER_ANGLE*/);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This SmartDashboard.getNumber call seems dangerous... Even if there is no longer an "amp angle" field on the SmartDashboard, it would put my mind at ease if we just changed the Field.AMPLIFIER_ANGLE to be the value you liked best.

If your testing earlier discovered that there was a particular angle that worked best, we need to make sure that the Field.AMPLIFIER_ANGLE constant gets updated appropriately, instead of leaving that change in the SmartDashboard widget.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree we should change this,but to set ur mind at ease, when the Boolean is initialized on SmartDashboard (whenever robot code starts) it is set to whatever the constant is. So if you never change anything on SmartDashboard, you will just use the constant

2 changes: 1 addition & 1 deletion src/main/java/frc/robot/settings/Constants.java
Original file line number Diff line number Diff line change
@@ -429,7 +429,7 @@ public final class Field{

public static final double AMPLIFIER_ANGLE = 101;
public static final double SUBWOOFER_ANGLE = 55;
public static final double STAGE_ANGLE = 40;
public static final double PODIUM_ANGLE = 37.5;
//angle at 60 for bounce techinque, didn't work
}