[hal,wpilib] Update MatchTime docs for teleop and auto mode (NFC) (#8606)

Update Timer and JNI MatchTime functions to latest docs
This commit is contained in:
sciencewhiz
2026-02-09 17:14:42 -08:00
committed by GitHub
parent 2c5529d714
commit 7ac0612397
6 changed files with 36 additions and 24 deletions

View File

@@ -308,16 +308,19 @@ public class DriverStationJNI extends JNIWrapper {
public static native int getJoystickAxisType(byte joystickNum, byte axis);
/**
* Returns the approximate match time.
* Return the approximate match time. The FMS does not send an official match time to the robots,
* but does send an approximate match time. The value will count down the time remaining in the
* current period (auto or teleop). Warning: This is not an official time (so it cannot be used to
* dispute ref calls or guarantee that a function will trigger before the match ends).
*
* <p>The FMS does not send an official match time to the robots, but does send an approximate
* match time. The value will count down the time remaining in the current period (auto or
* teleop).
* <p>When connected to the real field, this number only changes in full integer increments, and
* always counts down.
*
* <p>Warning: This is not an official time (so it cannot be used to dispute ref calls or
* guarantee that a function will trigger before the match ends).
* <p>When the DS is in practice mode, this number is a floating point number, and counts down.
*
* <p>The Practice Match function of the DS approximates the behavior seen on the field.
* <p>When the DS is in teleop or autonomous mode, this number returns -1.0.
*
* <p>Simulation matches DS behavior without an FMS connected.
*
* @return time remaining in current match period (auto or teleop)
* @see "HAL_GetMatchTime"

View File

@@ -187,8 +187,7 @@ int32_t HAL_SetJoystickOutputs(int32_t joystickNum, int64_t outputs,
* <p>When the DS is in practice mode, this number is a floating point number,
* and counts down.
*
* <p>When the DS is in teleop or autonomous mode, this number is a floating
* point number, and counts up.
* <p>When the DS is in teleop or autonomous mode, this number returns -1.0.
*
* <p>Simulation matches DS behavior without an FMS connected.
*

View File

@@ -339,8 +339,7 @@ class DriverStation final {
* <p>When the DS is in practice mode, this number is a floating point number,
* and counts down.
*
* <p>When the DS is in teleop or autonomous mode, this number is a floating
* point number, and counts up.
* <p>When the DS is in teleop or autonomous mode, this number returns -1.0.
*
* <p>Simulation matches DS behavior without an FMS connected.
*

View File

@@ -139,19 +139,23 @@ class Timer {
static units::second_t GetFPGATimestamp();
/**
* Return the approximate match time.
*
* The FMS does not send an official match time to the robots, but does send
* an approximate match time. The value will count down the time remaining in
* the current period (auto or teleop).
*
* Return the approximate match time. The FMS does not send an official match
* time to the robots, but does send an approximate match time. The value will
* count down the time remaining in the current period (auto or teleop).
* Warning: This is not an official time (so it cannot be used to dispute ref
* calls or guarantee that a function will trigger before the match ends).
*
* The Practice Match function of the DS approximates the behavior seen on the
* field.
* <p>When connected to the real field, this number only changes in full
* integer increments, and always counts down.
*
* @return Time remaining in current match period (auto or teleop)
* <p>When the DS is in practice mode, this number is a floating point number,
* and counts down.
*
* <p>When the DS is in teleop or autonomous mode, this number returns -1.0.
*
* <p>Simulation matches DS behavior without an FMS connected.
*
* @return Time remaining in current match period (auto or teleop) in seconds
*/
static units::second_t GetMatchTime();

View File

@@ -1182,8 +1182,7 @@ public final class DriverStation {
*
* <p>When the DS is in practice mode, this number is a floating point number, and counts down.
*
* <p>When the DS is in teleop or autonomous mode, this number is a floating point number, and
* counts up.
* <p>When the DS is in teleop or autonomous mode, this number returns -1.0.
*
* <p>Simulation matches DS behavior without an FMS connected.
*

View File

@@ -40,8 +40,16 @@ public class Timer {
* Return the approximate match time. The FMS does not send an official match time to the robots,
* but does send an approximate match time. The value will count down the time remaining in the
* current period (auto or teleop). Warning: This is not an official time (so it cannot be used to
* dispute ref calls or guarantee that a function will trigger before the match ends) The Practice
* Match function of the DS approximates the behavior seen on the field.
* dispute ref calls or guarantee that a function will trigger before the match ends).
*
* <p>When connected to the real field, this number only changes in full integer increments, and
* always counts down.
*
* <p>When the DS is in practice mode, this number is a floating point number, and counts down.
*
* <p>When the DS is in teleop or autonomous mode, this number returns -1.0.
*
* <p>Simulation matches DS behavior without an FMS connected.
*
* @return Time remaining in current match period (auto or teleop) in seconds
*/