Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
18 changes: 13 additions & 5 deletions src/main/java/frc/robot/Robot.java
Original file line number Diff line number Diff line change
Expand Up @@ -680,12 +680,12 @@ private void addControllerBindings(Indexer indexer, Shooter shooter, Intake inta
shooter.runHoodCurrentZeroing(), intake.runCurrentZeroing())));

new Trigger(() -> NewAutoAim.targetInTurretDeadzone())
.onTrue(
driver
.rumbleCmd(1, 1)
.withTimeout(0.25)
.alongWith(operator.rumbleCmd(1, 1).withTimeout(0.25)));
.onTrue(driver.rumbleCmd(1, 1).withTimeout(0.25));
// .alongWith(operator.rumbleCmd(1, 1).withTimeout(0.25)));
// ---zeroing stuff---
new Trigger(() -> superstructure.tenSecsLeftInOffShift())
.onTrue(operator.rumbleCmd(1, 1).withTimeout(0.25));

driver.povUp().whileTrue(shooter.currentZeroTurretAgainstForwardHardstop());

driver
Expand All @@ -706,6 +706,14 @@ private void addControllerBindings(Indexer indexer, Shooter shooter, Intake inta
.onTrue(Commands.runOnce(() -> leftClimbTarget = false));
// I HATE THIS!
operator.leftStick().whileTrue(Commands.parallel(intake.restRetracted(), shooter.stopTurret()));
operator
.rightStick()
.onTrue(
Commands.runOnce(
() ->
shooter
.resetTurretToPosition(shooter::getCalculatedTurretRotations)
.ignoringDisable(true)));

driver
.rightBumper()
Expand Down
17 changes: 17 additions & 0 deletions src/main/java/frc/robot/Superstructure.java
Original file line number Diff line number Diff line change
Expand Up @@ -823,6 +823,23 @@ public boolean isOurShift() {
}
}

public boolean tenSecsLeftInOffShift() {
if (!isOurShift() && (10.0 <= getTimeLeftInShift() && getTimeLeftInShift() <= 11.0)) {
return true;
} else {
return false;
}
}

@AutoLogOutput(key = "10s Left (in off shift)")
public boolean lessThanTenSecsLeftInOffShift() {
if (!isOurShift() && (10.0 <= getTimeLeftInShift())) {
return true;
} else {
return false;
}
}

public boolean inScoringArea() {
// return true;
if (swerve == null) return false;
Expand Down
14 changes: 7 additions & 7 deletions src/main/java/frc/robot/utils/autoaim/AutoAim.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,43 +63,43 @@ public class AutoAim {
1.716849,
new ShotData(
Rotation2d.fromDegrees(23 - 13.16),
30 * 0.84615384615 / TurretSubsystem.FLYWHEEL_GEAR_RATIO + 1,
30 * 0.84615384615 / TurretSubsystem.FLYWHEEL_GEAR_RATIO, // + 1,
0.8));
COMP_HUB_SHOT_TREE.put(
2.017596,
new ShotData(
Rotation2d.fromDegrees(23 - 13.16),
33 * 0.84615384615 / TurretSubsystem.FLYWHEEL_GEAR_RATIO + 1,
33 * 0.84615384615 / TurretSubsystem.FLYWHEEL_GEAR_RATIO, // + 1,
0.9));
COMP_HUB_SHOT_TREE.put(
2.423868,
new ShotData(
Rotation2d.fromDegrees(25 - 13.16),
35 * 0.84615384615 / TurretSubsystem.FLYWHEEL_GEAR_RATIO + 1,
35 * 0.84615384615 / TurretSubsystem.FLYWHEEL_GEAR_RATIO, // + 1,
1.1));
COMP_HUB_SHOT_TREE.put(
2.664198,
new ShotData(
Rotation2d.fromDegrees(26 - 13.16),
36 * 0.84615384615 / TurretSubsystem.FLYWHEEL_GEAR_RATIO + 1,
36 * 0.84615384615 / TurretSubsystem.FLYWHEEL_GEAR_RATIO, // + 1,
1.2));
COMP_HUB_SHOT_TREE.put(
2.903207,
new ShotData(
Rotation2d.fromDegrees(30 - 13.16),
35 * 0.84615384615 / TurretSubsystem.FLYWHEEL_GEAR_RATIO + 1,
35 * 0.84615384615 / TurretSubsystem.FLYWHEEL_GEAR_RATIO, // + 1,
1.2));
COMP_HUB_SHOT_TREE.put(
3.156802,
new ShotData(
Rotation2d.fromDegrees(32 - 13.16),
35 * 0.84615384615 / TurretSubsystem.FLYWHEEL_GEAR_RATIO + 1,
35 * 0.84615384615 / TurretSubsystem.FLYWHEEL_GEAR_RATIO, // + 1,
1.23));
COMP_HUB_SHOT_TREE.put(
3.437033,
new ShotData(
Rotation2d.fromDegrees(34 - 13.16),
35 * 0.84615384615 / TurretSubsystem.FLYWHEEL_GEAR_RATIO + 1,
35 * 0.84615384615 / TurretSubsystem.FLYWHEEL_GEAR_RATIO, // + 1,
1.25));
COMP_HUB_SHOT_TREE.put(
3.611052,
Expand Down
Loading