mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-25 01:41:43 +00:00
[wpilib] Update getAlliance() docs (NFC) (#5971)
kInvalid was replaced with an optional.
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user