Publishes match specific data and other FMS info to NT (#874)

This is so products like SB can present the current setup.
This commit is contained in:
Thad House
2018-01-18 23:17:28 -08:00
committed by Peter Johnson
parent 07f70cf784
commit 48ae6c954a
4 changed files with 241 additions and 20 deletions

View File

@@ -25,6 +25,7 @@
namespace frc {
struct MatchInfoData;
class MatchDataSender;
/**
* Provide access to the network communication data to / from the Driver
@@ -133,6 +134,7 @@ class DriverStation : public ErrorBase, public RobotStateInterface {
void ReportJoystickUnpluggedWarning(const llvm::Twine& message);
void Run();
void UpdateControlWord(bool force, HAL_ControlWord& controlWord) const;
void SendMatchData();
// Joystick User Data
std::unique_ptr<HAL_JoystickAxes[]> m_joystickAxes;
@@ -148,6 +150,8 @@ class DriverStation : public ErrorBase, public RobotStateInterface {
std::unique_ptr<HAL_JoystickDescriptor[]> m_joystickDescriptorCache;
std::unique_ptr<MatchInfoData> m_matchInfoCache;
std::unique_ptr<MatchDataSender> m_matchDataSender;
// Joystick button rising/falling edge flags
std::array<uint32_t, kJoystickPorts> m_joystickButtonsPressed;
std::array<uint32_t, kJoystickPorts> m_joystickButtonsReleased;