[wpilib] DriverStation: Add DataLog support for modes and joystick data

This commit is contained in:
Peter Johnson
2022-01-27 00:15:43 -08:00
parent 757ea91932
commit 9f52d8a3b1
3 changed files with 402 additions and 0 deletions

View File

@@ -9,6 +9,10 @@
#include <units/time.h>
#include <wpi/deprecated.h>
namespace wpi::log {
class DataLog;
} // namespace wpi::log
namespace frc {
/**
@@ -441,6 +445,14 @@ class DriverStation {
*/
static bool IsJoystickConnectionWarningSilenced();
/**
* Starts logging DriverStation data to data log. Repeated calls are ignored.
*
* @param log data log
* @param logJoysticks if true, log joystick data
*/
static void StartDataLog(wpi::log::DataLog& log, bool logJoysticks = true);
private:
DriverStation() = default;
};