mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-30 02:31:44 +00:00
Adds HAL calls for match data from DS (#691)
This commit is contained in:
committed by
Peter Johnson
parent
237b2df82f
commit
6af4940c22
@@ -47,6 +47,13 @@ enum HAL_AllianceStationID : int32_t {
|
||||
HAL_AllianceStationID_kBlue3,
|
||||
};
|
||||
|
||||
enum HAL_MatchType {
|
||||
HAL_kMatchType_none,
|
||||
HAL_kMatchType_practice,
|
||||
HAL_kMatchType_qualification,
|
||||
HAL_kMatchType_elimination,
|
||||
};
|
||||
|
||||
/* The maximum number of axes that will be stored in a single HALJoystickAxes
|
||||
* struct. This is used for allocating buffers, not bounds checking, since
|
||||
* there are usually less axes in practice.
|
||||
@@ -79,9 +86,18 @@ struct HAL_JoystickDescriptor {
|
||||
uint8_t povCount;
|
||||
};
|
||||
|
||||
struct HAL_MatchInfo {
|
||||
char* eventName;
|
||||
HAL_MatchType matchType;
|
||||
uint16_t matchNumber;
|
||||
uint8_t replayNumber;
|
||||
char* gameSpecificMessage;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int32_t HAL_SetErrorData(const char* errors, int32_t errorsLength,
|
||||
int32_t waitMs);
|
||||
int32_t HAL_SendError(HAL_Bool isError, int32_t errorCode, HAL_Bool isLVCode,
|
||||
@@ -105,6 +121,9 @@ int32_t HAL_SetJoystickOutputs(int32_t joystickNum, int64_t outputs,
|
||||
int32_t leftRumble, int32_t rightRumble);
|
||||
double HAL_GetMatchTime(int32_t* status);
|
||||
|
||||
int HAL_GetMatchInfo(HAL_MatchInfo* info);
|
||||
void HAL_FreeMatchInfo(HAL_MatchInfo* info);
|
||||
|
||||
#ifndef HAL_USE_LABVIEW
|
||||
|
||||
void HAL_ReleaseDSMutex(void);
|
||||
|
||||
Reference in New Issue
Block a user