From 7bc89c43228acbaa54e6fa91ebbe07c3ea5be5a0 Mon Sep 17 00:00:00 2001 From: Tyler Veness Date: Tue, 28 Nov 2023 10:03:12 -0800 Subject: [PATCH] [wpilib] Update getAlliance() docs (NFC) (#5971) kInvalid was replaced with an optional. --- wpilibc/src/main/native/include/frc/DriverStation.h | 7 +++---- .../src/main/java/edu/wpi/first/wpilibj/DriverStation.java | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/wpilibc/src/main/native/include/frc/DriverStation.h b/wpilibc/src/main/native/include/frc/DriverStation.h index ea568a722f7..3b2b3df86da 100644 --- a/wpilibc/src/main/native/include/frc/DriverStation.h +++ b/wpilibc/src/main/native/include/frc/DriverStation.h @@ -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 GetAlliance(); diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/DriverStation.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/DriverStation.java index ce3a3e0a6a5..e18afe99e7a 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/DriverStation.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/DriverStation.java @@ -1113,7 +1113,7 @@ public static int getReplayNumber() { * *

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 getAlliance() { AllianceStationID allianceStationID = DriverStationJNI.getAllianceStation();