All,
We finally got our code ported over to the new 2020 command API. Yay!
We decided to add some FMS/DS info to our Shuffleboard. One of those was “remaining time”, using frc::DriverStation::GetMatchTime(). According to the documentation:
frc::DriverStation::GetMatchTime():
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). …
Returns:
Time remaining in current match period (auto or teleop)
The italics are part of our question. Our question is this: Right now we are using the simulator. Using the Shuffleboard with the simulator, it shows 0 seconds “remaining” after starting the simulator (with it starting in disabled mode). After starting autonomous, tele-operated, or test, the “remaining” time starts at 0 and counts up. Going back to disabled, the time pauses.
From the documentation, we would have expected the output of GetMatchTime() to indicate “0:15.0” at start, countdown to 0:00.0, and then go to 2:15.0 at start of teleop, and count down to 0. But we are seeing basically an elapsed time, not remaining time.
Is this a problem with the simulator, or are the docs incorrect? Is the elapsed time what is intended?
Any help appreciated!