Skip to content

Commit

Permalink
[wpilib] Update getAlliance() docs (NFC) (wpilibsuite#5971)
Browse files Browse the repository at this point in the history
kInvalid was replaced with an optional.
  • Loading branch information
calcmogul authored Nov 28, 2023
1 parent 841ea68 commit 7bc89c4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions wpilibc/src/main/native/include/frc/DriverStation.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1113,7 +1113,7 @@ public static int getReplayNumber() {
*
* <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();
Expand Down

0 comments on commit 7bc89c4

Please sign in to comment.