Skip to content

Commit 1a07ea2

Browse files
committed
tweak elevator safety, add autoPlace LEDs
1 parent c2ea525 commit 1a07ea2

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/main/java/frc/robot/constants/RobotStateConstants.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ public class RobotStateConstants {
44
public static final double[] kNodeAngles = {0.0, 60.0, 120.0, 180.0, -120.0, -60.0};
55
public static final double kAlgaeRetreatDistance = 0;
66

7-
public static final double kBlueBargeSafeX = 7.6;
7+
public static final double kBlueBargeSafeX = 7; // 7.6
88
public static final double kRedBargeSafeX = DriveConstants.kFieldMaxX - kBlueBargeSafeX;
99

1010
public static final double kCoralEjectTimer = 0.25;

src/main/java/frc/robot/subsystems/robotState/RobotStateSubsystem.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -599,6 +599,7 @@ public void toScoreAlgae() {
599599
if (isBargeSafe) {
600600
driveSubsystem.setDriveMultiplier(DriveConstants.kBargeScoreStickMultiplier);
601601
if (isAutoPlacing) {
602+
setAutoPlacingLed(true);
602603
driveSubsystem.setIgnoreSticks(true);
603604
bargeAlignSubsystem.startBargeAlign(allianceColor);
604605
setState(RobotStates.BARGE_ALIGN);
@@ -958,10 +959,12 @@ public void periodic() {
958959
} else if (!algaeSubsystem.hasAlgae()
959960
&& scoringTimer.hasElapsed(RobotStateConstants.kAlgaeEjectTimer)
960961
&& isEjectingAlgae) {
962+
setAutoPlacingLed(false);
961963
driveSubsystem.setIgnoreSticks(false);
962964
isEjectingAlgae = false;
963965
toStowSafe();
964966
} else if (algaeHeight != currentAlgaeHeight) {
967+
setAutoPlacingLed(false);
965968
toScoreAlgae();
966969
}
967970
}

0 commit comments

Comments
 (0)