12 #include "hal/Types.h"
20 #define HAL_IO_CONFIG_DATA_SIZE 32
21 #define HAL_SYS_STATUS_DATA_SIZE 44
22 #define HAL_USER_STATUS_DATA_SIZE \
23 (984 - HAL_IO_CONFIG_DATA_SIZE - HAL_SYS_STATUS_DATA_SIZE)
25 #define HALFRC_NetworkCommunication_DynamicType_DSEnhancedIO_Input 17
26 #define HALFRC_NetworkCommunication_DynamicType_DSEnhancedIO_Output 18
27 #define HALFRC_NetworkCommunication_DynamicType_Kinect_Header 19
28 #define HALFRC_NetworkCommunication_DynamicType_Kinect_Extra1 20
29 #define HALFRC_NetworkCommunication_DynamicType_Kinect_Vertices1 21
30 #define HALFRC_NetworkCommunication_DynamicType_Kinect_Extra2 22
31 #define HALFRC_NetworkCommunication_DynamicType_Kinect_Vertices2 23
32 #define HALFRC_NetworkCommunication_DynamicType_Kinect_Joystick 24
33 #define HALFRC_NetworkCommunication_DynamicType_Kinect_Custom 25
37 uint32_t autonomous : 1;
40 uint32_t fmsAttached : 1;
41 uint32_t dsAttached : 1;
42 uint32_t control_reserved : 26;
47 HAL_ENUM(HAL_AllianceStationID) {
48 HAL_AllianceStationID_kRed1,
49 HAL_AllianceStationID_kRed2,
50 HAL_AllianceStationID_kRed3,
51 HAL_AllianceStationID_kBlue1,
52 HAL_AllianceStationID_kBlue2,
53 HAL_AllianceStationID_kBlue3,
56 HAL_ENUM(HAL_MatchType) {
58 HAL_kMatchType_practice,
59 HAL_kMatchType_qualification,
60 HAL_kMatchType_elimination,
68 #define HAL_kMaxJoystickAxes 12
69 #define HAL_kMaxJoystickPOVs 12
70 #define HAL_kMaxJoysticks 6
74 float axes[HAL_kMaxJoystickAxes];
80 int16_t povs[HAL_kMaxJoystickPOVs];
95 uint8_t axisTypes[HAL_kMaxJoystickAxes];
103 HAL_MatchType matchType;
104 uint16_t matchNumber;
105 uint8_t replayNumber;
106 uint8_t gameSpecificMessage[64];
107 uint16_t gameSpecificMessageSize;
127 int32_t
HAL_SendError(HAL_Bool isError, int32_t errorCode, HAL_Bool isLVCode,
128 const char* details,
const char* location,
129 const char* callStack, HAL_Bool printMsg);
252 int32_t leftRumble, int32_t rightRumble);
280 #ifndef HAL_USE_LABVIEW
361 #endif // HAL_USE_LABVIEW
HAL_Bool HAL_IsNewControlData(void)
Has a new control packet from the driver station arrived since the last time this function was called...
Definition: DriverStation.h:90
Definition: DriverStation.h:101
HAL_Bool HAL_GetJoystickIsXbox(int32_t joystickNum)
Gets is a specific joystick is considered to be an XBox controller.
int32_t HAL_GetJoystickAxisType(int32_t joystickNum, int32_t axis)
Gets the type of a specific joystick axis.
int32_t HAL_GetJoystickButtons(int32_t joystickNum, HAL_JoystickButtons *buttons)
Gets the buttons of a specific joystick.
int32_t HAL_GetJoystickType(int32_t joystickNum)
Gets the type of joystick connected.
int32_t HAL_SetJoystickOutputs(int32_t joystickNum, int64_t outputs, int32_t leftRumble, int32_t rightRumble)
Set joystick outputs.
void HAL_ReleaseDSMutex(void)
Releases the DS Mutex to allow proper shutdown of any threads that are waiting on it...
HAL_AllianceStationID HAL_GetAllianceStation(int32_t *status)
Gets the current alliance station ID.
void HAL_WaitForDSData(void)
Waits for the newest DS packet to arrive.
Definition: DriverStation.h:78
int32_t HAL_GetMatchInfo(HAL_MatchInfo *info)
Gets info about a specific match.
void HAL_ObserveUserProgramStarting(void)
Sets the program starting flag in the DS.
char * HAL_GetJoystickName(int32_t joystickNum)
Gets the name of a joystick.
void HAL_ObserveUserProgramAutonomous(void)
Sets the autonomous enabled flag in the DS.
HAL_Bool HAL_WaitForDSDataTimeout(double timeout)
Waits for the newest DS packet to arrive.
int32_t HAL_GetJoystickDescriptor(int32_t joystickNum, HAL_JoystickDescriptor *desc)
Retrieves the Joystick Descriptor for particular slot.
void HAL_ObserveUserProgramTest(void)
Sets the test mode flag in the DS.
int32_t HAL_SendError(HAL_Bool isError, int32_t errorCode, HAL_Bool isLVCode, const char *details, const char *location, const char *callStack, HAL_Bool printMsg)
Sends an error to the driver station.
void HAL_ObserveUserProgramDisabled(void)
Sets the disabled flag in the DS.
int32_t HAL_GetJoystickAxes(int32_t joystickNum, HAL_JoystickAxes *axes)
Gets the axes of a specific joystick.
void HAL_ObserveUserProgramTeleop(void)
Sets the teleoperated enabled flag in the DS.
void HAL_InitializeDriverStation(void)
Initializes the driver station communication.
void HAL_FreeJoystickName(char *name)
Frees a joystick name received with HAL_GetJoystickName.
int32_t HAL_GetJoystickPOVs(int32_t joystickNum, HAL_JoystickPOVs *povs)
Gets the POVs of a specific joystick.
double HAL_GetMatchTime(int32_t *status)
Returns the approximate match time.
Definition: DriverStation.h:35
Definition: DriverStation.h:72
int32_t HAL_GetControlWord(HAL_ControlWord *controlWord)
Gets the current control word of the driver station.