Skip to content
This repository has been archived by the owner on Jul 14, 2024. It is now read-only.

Commit

Permalink
fix(command): Fix not aiming in auto shoot
Browse files Browse the repository at this point in the history
  • Loading branch information
RealAllenDa committed Feb 27, 2024
1 parent b2cede8 commit 7e7ded0
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@ public void initialize() {

@Override
public void execute() {
// if shooter beam break is on: shooting, do not aim
// if not (indexer beam break on and not intaker beam break on): intaking, do not aim
if (beamBreakSubsystem.getInputs().isShooterBeamBreakOn || !(
if (!(
beamBreakSubsystem.getInputs().isIndexerBeamBreakOn &&
!beamBreakSubsystem.getInputs().isIntakerBeamBreakOn
)) {
Expand All @@ -49,6 +48,7 @@ public void execute() {
targetPoseCameraSpace().
getTranslation().
getDistance(new Translation3d());
debug("Shooter:", "far => " + Constants.ShooterConstants.speakerArmOffsetFar.magnitude() + " normal => " + Constants.ShooterConstants.speakerArmOffset.magnitude() + " short => " + Constants.ShooterConstants.speakerArmOffsetNear.magnitude());
if (distance >= Constants.ShooterConstants.shortShootMaxDistance.magnitude()) {
offset = Constants.ShooterConstants.speakerArmOffsetFar.magnitude();
debug("Shooter:", "far shoot: offset = " + offset);
Expand Down

0 comments on commit 7e7ded0

Please sign in to comment.