[wpilib] Update getAlliance() docs (NFC) (#5971)

kInvalid was replaced with an optional.
This commit is contained in:
Tyler Veness
2023-11-28 10:03:12 -08:00
committed by GitHub
parent 841ea682d1
commit 7bc89c4322
2 changed files with 4 additions and 5 deletions

View File

@@ -274,14 +274,13 @@ class DriverStation final {
static int GetReplayNumber();
/**
* Return the alliance that the driver station says it is on from the FMS.
* Get the current alliance from the FMS.
*
* If the FMS is not connected, it is set from the team alliance setting on
* the driver station.
*
* This could return kRed or kBlue.
*
* @return The Alliance enum (kRed, kBlue or kInvalid)
* @return The alliance (red or blue) or an empty optional if the alliance is
* invalid
*/
static std::optional<Alliance> GetAlliance();

View File

@@ -1113,7 +1113,7 @@ public final class DriverStation {
*
* <p>If the FMS is not connected, it is set from the team alliance setting on the driver station.
*
* @return the current alliance
* @return The alliance (red or blue) or an empty optional if the alliance is invalid
*/
public static Optional<Alliance> getAlliance() {
AllianceStationID allianceStationID = DriverStationJNI.getAllianceStation();