package frc.robot.util;
+
import java.util.Optional;
-
import edu.wpi.first.wpilibj.DriverStation;
import edu.wpi.first.wpilibj.DriverStation.Alliance;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
-
public class HubActive {
-
--
static public boolean isHubActive() {
Optional<Alliance> alliance = DriverStation.getAlliance();
// If we have no alliance, we cannot be enabled, therefore no hub.
}
}
-
- static public Optional<Double> timeToUnactive() {
+ static public Optional<Double> timeToInactive() {
-
Alliance alliance = DriverStation.getAlliance().orElse(Alliance.Blue);
if (alliance == Alliance.Blue) {
alliance = Alliance.Red;
}
}
-
-
--
// Shift was is active for blue if red won auto, or red if blue won auto.
boolean shift1Active = switch (alliance) {
case Red -> !redInactiveFirst;