Hello,
I’m trying to run a simple method that will return a value if the alliance read by Driverstation is Red or another if it is Blue. I structured it as follows however I get the error “Incompatible operand types Optional<DriverStation.Alliance> and DriverStation.Alliance” which to my understanding is something new in the Drivertstation lib for 2024 as I’ve seen other teams do it this way in 2024. Does anyone know how to convert an Optional to a normal return or structure it differently?
If(Driverstation.getAlliance() == Alliance.Blue){
return blank}
else if (Driverstation.getAlliance() == Alliance.Red){
return blank2}
- Brennon, Team 599