WPILibC++ 2027.0.0-alpha-4
Loading...
Searching...
No Matches
Driver Station Functions

Classes

struct  HAL_ControlWord
struct  HAL_JoystickAxes
struct  HAL_JoystickPOVs
struct  HAL_JoystickButtons
struct  HAL_JoystickTouchpadFinger
struct  HAL_JoystickTouchpad
struct  HAL_JoystickTouchpads
struct  HAL_GameData
struct  HAL_JoystickDescriptor
struct  HAL_MatchInfo
struct  HAL_OpModeOption

Macros

#define HAL_CONTROLWORD_OPMODE_HASH_MASK   0x00FFFFFFFFFFFFFFLL
#define HAL_CONTROLWORD_ROBOT_MODE_MASK   0x0300000000000000LL
#define HAL_CONTROLWORD_ROBOT_MODE_SHIFT   56
#define HAL_CONTROLWORD_ENABLED_MASK   0x0400000000000000LL
#define HAL_CONTROLWORD_ESTOP_MASK   0x0800000000000000LL
#define HAL_CONTROLWORD_FMS_ATTACHED_MASK   0x1000000000000000LL
#define HAL_CONTROLWORD_DS_ATTACHED_MASK   0x2000000000000000LL
#define HAL_kMaxJoystickTouchpads   2
 The maximum number of touchpads that will be stored in a single HAL_JoystickTouchpads struct.
#define HAL_kMaxJoystickTouchpadFingers   2
 The maximum number of fingers that will be stored in a single HAL_JoystickTouchpad struct.
#define HAL_kMaxJoystickAxes   12
 The maximum number of axes that will be stored in a single HAL_JoystickAxes struct.
#define HAL_kMaxJoystickPOVs   8
 The maximum number of POVs that will be stored in a single HAL_JoystickPOVs struct.
#define HAL_kMaxJoysticks   6
 The maximum number of joysticks.
#define HAL_OPMODE_HASH_MASK   HAL_CONTROLWORD_OPMODE_HASH_MASK
#define HAL_OPMODE_ROBOT_MODE_MASK   HAL_CONTROLWORD_ROBOT_MODE_MASK
#define HAL_OPMODE_ROBOT_MODE_SHIFT   HAL_CONTROLWORD_ROBOT_MODE_SHIFT
#define HAL_MAKE_OPMODEID(mode, hash)

Typedefs

typedef struct HAL_ControlWord HAL_ControlWord
typedef struct HAL_JoystickAxes HAL_JoystickAxes
typedef struct HAL_JoystickPOVs HAL_JoystickPOVs
typedef struct HAL_JoystickButtons HAL_JoystickButtons
typedef struct HAL_JoystickTouchpadFinger HAL_JoystickTouchpadFinger
typedef struct HAL_JoystickTouchpad HAL_JoystickTouchpad
typedef struct HAL_JoystickTouchpads HAL_JoystickTouchpads
typedef struct HAL_GameData HAL_GameData
typedef struct HAL_JoystickDescriptor HAL_JoystickDescriptor
typedef struct HAL_MatchInfo HAL_MatchInfo
typedef struct HAL_OpModeOption HAL_OpModeOption

Enumerations

enum  HAL_AllianceStationID : int32_t {
  HAL_AllianceStationID_kUnknown = 0 , HAL_AllianceStationID_kRed1 , HAL_AllianceStationID_kRed2 , HAL_AllianceStationID_kRed3 ,
  HAL_AllianceStationID_kBlue1 , HAL_AllianceStationID_kBlue2 , HAL_AllianceStationID_kBlue3
}
enum  HAL_MatchType : int32_t { HAL_kMatchType_none = 0 , HAL_kMatchType_practice , HAL_kMatchType_qualification , HAL_kMatchType_elimination }
enum  HAL_RobotMode : int32_t { HAL_ROBOTMODE_UNKNOWN = 0 , HAL_ROBOTMODE_AUTONOMOUS , HAL_ROBOTMODE_TELEOPERATED , HAL_ROBOTMODE_TEST }

Functions

 HAL_ENUM_WITH_UNDERLYING_TYPE (HAL_JoystickPOV, uint8_t)
HAL_ControlWord HAL_MakeControlWord (int64_t opModeHash, HAL_RobotMode robotMode, HAL_Bool enabled, HAL_Bool eStop, HAL_Bool fmsAttached, HAL_Bool dsAttached)
int64_t HAL_ControlWord_GetOpModeHash (HAL_ControlWord word)
int64_t HAL_ControlWord_GetOpModeId (HAL_ControlWord word)
void HAL_ControlWord_SetOpModeId (HAL_ControlWord *word, int64_t id)
HAL_RobotMode HAL_ControlWord_GetRobotMode (HAL_ControlWord word)
HAL_Bool HAL_ControlWord_IsEnabled (HAL_ControlWord word)
HAL_Bool HAL_ControlWord_IsEStopped (HAL_ControlWord word)
HAL_Bool HAL_ControlWord_IsFMSAttached (HAL_ControlWord word)
HAL_Bool HAL_ControlWord_IsDSAttached (HAL_ControlWord word)
int64_t HAL_MakeOpModeId (HAL_RobotMode mode, int64_t hash)
HAL_RobotMode HAL_OpMode_GetRobotMode (int64_t id)
int64_t HAL_OpMode_GetHash (int64_t id)
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_SetPrintErrorImpl (void(*func)(const char *line, size_t size))
 Set the print function used by HAL_SendError.
int32_t HAL_SendConsoleLine (const char *line)
 Sends a line to the driver station console.
int32_t HAL_GetControlWord (HAL_ControlWord *controlWord)
 Gets the current control word of the driver station.
int32_t HAL_GetUncachedControlWord (HAL_ControlWord *controlWord)
 Gets the current control word of the driver station.
int32_t HAL_SetOpModeOptions (const struct HAL_OpModeOption *options, int32_t count)
 Sets operating mode options.
HAL_AllianceStationID HAL_GetAllianceStation (int32_t *status)
 Gets the current alliance station ID.
int32_t HAL_GetJoystickAxes (int32_t joystickNum, HAL_JoystickAxes *axes)
 Gets the axes of a specific joystick.
int32_t HAL_GetJoystickPOVs (int32_t joystickNum, HAL_JoystickPOVs *povs)
 Gets the POVs of a specific joystick.
int32_t HAL_GetJoystickButtons (int32_t joystickNum, HAL_JoystickButtons *buttons)
 Gets the buttons of a specific joystick.
int32_t HAL_GetJoystickTouchpads (int32_t joystickNum, HAL_JoystickTouchpads *touchpads)
 Gets the touchpads of a specific joystick.
void HAL_GetAllJoystickData (int32_t joystickNum, HAL_JoystickAxes *axes, HAL_JoystickPOVs *povs, HAL_JoystickButtons *buttons, HAL_JoystickTouchpads *touchpads)
 Gets all the data of a specific joystick.
int32_t HAL_GetJoystickDescriptor (int32_t joystickNum, HAL_JoystickDescriptor *desc)
 Retrieves the Joystick Descriptor for particular slot.
HAL_Bool HAL_GetJoystickIsGamepad (int32_t joystickNum)
 Gets whether a specific joystick is considered to be an Gamepad.
int32_t HAL_GetJoystickGamepadType (int32_t joystickNum)
 Gets the type of joystick connected.
int32_t HAL_GetGameData (HAL_GameData *gameData)
 Gets the game-specific message for the current match.
int32_t HAL_GetJoystickSupportedOutputs (int32_t joystickNum)
 Gets the supported outputs of a specific joystick.
void HAL_GetJoystickName (struct WPI_String *name, int32_t joystickNum)
 Gets the name of a joystick.
int32_t HAL_SetJoystickRumble (int32_t joystickNum, int32_t leftRumble, int32_t rightRumble, int32_t leftTriggerRumble, int32_t rightTriggerRumble)
 Set joystick rumbles.
int32_t HAL_SetJoystickLeds (int32_t joystickNum, int32_t leds)
 Set joystick LEDs.
double HAL_GetMatchTime (int32_t *status)
 Return the approximate match time.
HAL_Bool HAL_GetOutputsEnabled (void)
 Gets if outputs are enabled by the control system.
int32_t HAL_GetMatchInfo (HAL_MatchInfo *info)
 Gets info about a specific match.
HAL_Bool HAL_RefreshDSData (void)
 Refresh the DS control word.
void HAL_ProvideNewDataEventHandle (WPI_EventHandle handle)
 Adds an event handle to be signalled when new data arrives.
void HAL_RemoveNewDataEventHandle (WPI_EventHandle handle)
 Removes the event handle from being signalled when new data arrives.
void HAL_ObserveUserProgramStarting (void)
 Sets the program starting flag in the DS.
void HAL_ObserveUserProgram (HAL_ControlWord word)
 Sets the control word state returned to the DS.

Detailed Description

Macro Definition Documentation

◆ HAL_CONTROLWORD_DS_ATTACHED_MASK

#define HAL_CONTROLWORD_DS_ATTACHED_MASK   0x2000000000000000LL

◆ HAL_CONTROLWORD_ENABLED_MASK

#define HAL_CONTROLWORD_ENABLED_MASK   0x0400000000000000LL

◆ HAL_CONTROLWORD_ESTOP_MASK

#define HAL_CONTROLWORD_ESTOP_MASK   0x0800000000000000LL

◆ HAL_CONTROLWORD_FMS_ATTACHED_MASK

#define HAL_CONTROLWORD_FMS_ATTACHED_MASK   0x1000000000000000LL

◆ HAL_CONTROLWORD_OPMODE_HASH_MASK

#define HAL_CONTROLWORD_OPMODE_HASH_MASK   0x00FFFFFFFFFFFFFFLL

◆ HAL_CONTROLWORD_ROBOT_MODE_MASK

#define HAL_CONTROLWORD_ROBOT_MODE_MASK   0x0300000000000000LL

◆ HAL_CONTROLWORD_ROBOT_MODE_SHIFT

#define HAL_CONTROLWORD_ROBOT_MODE_SHIFT   56

◆ HAL_kMaxJoystickAxes

#define HAL_kMaxJoystickAxes   12

The maximum number of axes that will be stored in a single HAL_JoystickAxes struct.

This is used for allocating buffers, not bounds checking, since there are usually less axes in practice.

◆ HAL_kMaxJoystickPOVs

#define HAL_kMaxJoystickPOVs   8

The maximum number of POVs that will be stored in a single HAL_JoystickPOVs struct.

This is used for allocating buffers, not bounds checking, since there are usually less POVs in practice.

◆ HAL_kMaxJoysticks

#define HAL_kMaxJoysticks   6

The maximum number of joysticks.

◆ HAL_kMaxJoystickTouchpadFingers

#define HAL_kMaxJoystickTouchpadFingers   2

The maximum number of fingers that will be stored in a single HAL_JoystickTouchpad struct.

This is used for allocating buffers, not bounds checking, since there are usually less fingers in practice.

◆ HAL_kMaxJoystickTouchpads

#define HAL_kMaxJoystickTouchpads   2

The maximum number of touchpads that will be stored in a single HAL_JoystickTouchpads struct.

This is used for allocating buffers, not bounds checking, since there are usually less touchpads in practice.

◆ HAL_MAKE_OPMODEID

#define HAL_MAKE_OPMODEID ( mode,
hash )
Value:
((((int64_t)(mode) << HAL_OPMODE_ROBOT_MODE_SHIFT) & \
#define HAL_OPMODE_ROBOT_MODE_MASK
Definition DriverStationTypes.h:174
#define HAL_OPMODE_ROBOT_MODE_SHIFT
Definition DriverStationTypes.h:175
#define HAL_OPMODE_HASH_MASK
Definition DriverStationTypes.h:173

◆ HAL_OPMODE_HASH_MASK

#define HAL_OPMODE_HASH_MASK   HAL_CONTROLWORD_OPMODE_HASH_MASK

◆ HAL_OPMODE_ROBOT_MODE_MASK

#define HAL_OPMODE_ROBOT_MODE_MASK   HAL_CONTROLWORD_ROBOT_MODE_MASK

◆ HAL_OPMODE_ROBOT_MODE_SHIFT

#define HAL_OPMODE_ROBOT_MODE_SHIFT   HAL_CONTROLWORD_ROBOT_MODE_SHIFT

Typedef Documentation

◆ HAL_ControlWord

typedef struct HAL_ControlWord HAL_ControlWord

◆ HAL_GameData

typedef struct HAL_GameData HAL_GameData

◆ HAL_JoystickAxes

typedef struct HAL_JoystickAxes HAL_JoystickAxes

◆ HAL_JoystickButtons

typedef struct HAL_JoystickButtons HAL_JoystickButtons

◆ HAL_JoystickDescriptor

typedef struct HAL_JoystickDescriptor HAL_JoystickDescriptor

◆ HAL_JoystickPOVs

typedef struct HAL_JoystickPOVs HAL_JoystickPOVs

◆ HAL_JoystickTouchpad

typedef struct HAL_JoystickTouchpad HAL_JoystickTouchpad

◆ HAL_JoystickTouchpadFinger

typedef struct HAL_JoystickTouchpadFinger HAL_JoystickTouchpadFinger

◆ HAL_JoystickTouchpads

typedef struct HAL_JoystickTouchpads HAL_JoystickTouchpads

◆ HAL_MatchInfo

typedef struct HAL_MatchInfo HAL_MatchInfo

◆ HAL_OpModeOption

typedef struct HAL_OpModeOption HAL_OpModeOption

Enumeration Type Documentation

◆ HAL_AllianceStationID

enum HAL_AllianceStationID : int32_t
Enumerator
HAL_AllianceStationID_kUnknown 

Unknown Alliance Station.

HAL_AllianceStationID_kRed1 

Red Alliance Station 1.

HAL_AllianceStationID_kRed2 

Red Alliance Station 2.

HAL_AllianceStationID_kRed3 

Red Alliance Station 3.

HAL_AllianceStationID_kBlue1 

Blue Alliance Station 1.

HAL_AllianceStationID_kBlue2 

Blue Alliance Station 2.

HAL_AllianceStationID_kBlue3 

Blue Alliance Station 3.

◆ HAL_MatchType

enum HAL_MatchType : int32_t
Enumerator
HAL_kMatchType_none 
HAL_kMatchType_practice 
HAL_kMatchType_qualification 
HAL_kMatchType_elimination 

◆ HAL_RobotMode

enum HAL_RobotMode : int32_t
Enumerator
HAL_ROBOTMODE_UNKNOWN 
HAL_ROBOTMODE_AUTONOMOUS 
HAL_ROBOTMODE_TELEOPERATED 
HAL_ROBOTMODE_TEST 

Function Documentation

◆ HAL_ControlWord_GetOpModeHash()

int64_t HAL_ControlWord_GetOpModeHash ( HAL_ControlWord word)
inline

◆ HAL_ControlWord_GetOpModeId()

int64_t HAL_ControlWord_GetOpModeId ( HAL_ControlWord word)
inline

◆ HAL_ControlWord_GetRobotMode()

HAL_RobotMode HAL_ControlWord_GetRobotMode ( HAL_ControlWord word)
inline

◆ HAL_ControlWord_IsDSAttached()

HAL_Bool HAL_ControlWord_IsDSAttached ( HAL_ControlWord word)
inline

◆ HAL_ControlWord_IsEnabled()

HAL_Bool HAL_ControlWord_IsEnabled ( HAL_ControlWord word)
inline

◆ HAL_ControlWord_IsEStopped()

HAL_Bool HAL_ControlWord_IsEStopped ( HAL_ControlWord word)
inline

◆ HAL_ControlWord_IsFMSAttached()

HAL_Bool HAL_ControlWord_IsFMSAttached ( HAL_ControlWord word)
inline

◆ HAL_ControlWord_SetOpModeId()

void HAL_ControlWord_SetOpModeId ( HAL_ControlWord * word,
int64_t id )
inline

◆ HAL_ENUM_WITH_UNDERLYING_TYPE()

HAL_ENUM_WITH_UNDERLYING_TYPE ( HAL_JoystickPOV ,
uint8_t  )

Centered

Up

Right

Down

Left

Right-Up

Right-Down

Left-Up

Left-Down

◆ HAL_GetAllianceStation()

HAL_AllianceStationID HAL_GetAllianceStation ( int32_t * status)

Gets the current alliance station ID.

Parameters
[out]statusthe error code, or 0 for success
Returns
the alliance station ID

◆ HAL_GetAllJoystickData()

void HAL_GetAllJoystickData ( int32_t joystickNum,
HAL_JoystickAxes * axes,
HAL_JoystickPOVs * povs,
HAL_JoystickButtons * buttons,
HAL_JoystickTouchpads * touchpads )

Gets all the data of a specific joystick.

Parameters
joystickNumthe joystick number
axesthe axes values (output)
povsthe POV values (output)
buttonsthe button values (output)
touchpadsthe touchpad values (output)

◆ HAL_GetControlWord()

int32_t HAL_GetControlWord ( HAL_ControlWord * controlWord)

Gets the current control word of the driver station.

The control word contains the robot state.

Parameters
controlWordthe control word (out)
Returns
the error code, or 0 for success

◆ HAL_GetGameData()

int32_t HAL_GetGameData ( HAL_GameData * gameData)

Gets the game-specific message for the current match.

Parameters
gameDatathe game-specific message (output)
Returns
the error code, or 0 for success

◆ HAL_GetJoystickAxes()

int32_t HAL_GetJoystickAxes ( int32_t joystickNum,
HAL_JoystickAxes * axes )

Gets the axes of a specific joystick.

Parameters
joystickNumthe joystick number
axesthe axes values (output)
Returns
the error code, or 0 for success

◆ HAL_GetJoystickButtons()

int32_t HAL_GetJoystickButtons ( int32_t joystickNum,
HAL_JoystickButtons * buttons )

Gets the buttons of a specific joystick.

Parameters
joystickNumthe joystick number
buttonsthe button values (output)
Returns
the error code, or 0 for success

◆ HAL_GetJoystickDescriptor()

int32_t HAL_GetJoystickDescriptor ( int32_t joystickNum,
HAL_JoystickDescriptor * desc )

Retrieves the Joystick Descriptor for particular slot.

Parameters
joystickNumthe joystick number
[out]descdescriptor (data transfer object) to fill in. desc is filled in regardless of success. In other words, if descriptor is not available, desc is filled in with default values matching the init-values in Java and C++ Driver Station for when caller requests a too-large joystick index.
Returns
error code reported from Network Comm back-end. Zero is good, nonzero is bad.

◆ HAL_GetJoystickGamepadType()

int32_t HAL_GetJoystickGamepadType ( int32_t joystickNum)

Gets the type of joystick connected.

This maps to SDL_GamepadType

Parameters
joystickNumthe joystick number
Returns
the enumerated gamepad type

◆ HAL_GetJoystickIsGamepad()

HAL_Bool HAL_GetJoystickIsGamepad ( int32_t joystickNum)

Gets whether a specific joystick is considered to be an Gamepad.

Parameters
joystickNumthe joystick number
Returns
true if gamepad, false otherwise

◆ HAL_GetJoystickName()

void HAL_GetJoystickName ( struct WPI_String * name,
int32_t joystickNum )

Gets the name of a joystick.

The returned string must be freed with WPI_FreeString

Parameters
namethe joystick name string
joystickNumthe joystick number

◆ HAL_GetJoystickPOVs()

int32_t HAL_GetJoystickPOVs ( int32_t joystickNum,
HAL_JoystickPOVs * povs )

Gets the POVs of a specific joystick.

Parameters
joystickNumthe joystick number
povsthe POV values (output)
Returns
the error code, or 0 for success

◆ HAL_GetJoystickSupportedOutputs()

int32_t HAL_GetJoystickSupportedOutputs ( int32_t joystickNum)

Gets the supported outputs of a specific joystick.

Parameters
joystickNumthe joystick number
Returns
bitmask of supported outputs

◆ HAL_GetJoystickTouchpads()

int32_t HAL_GetJoystickTouchpads ( int32_t joystickNum,
HAL_JoystickTouchpads * touchpads )

Gets the touchpads of a specific joystick.

Parameters
joystickNumthe joystick number
touchpadsthe touchpad values (output)
Returns
the error code, or 0 for success

◆ HAL_GetMatchInfo()

int32_t HAL_GetMatchInfo ( HAL_MatchInfo * info)

Gets info about a specific match.

Parameters
[in]infothe match info (output)
Returns
the error code, or 0 for success

◆ HAL_GetMatchTime()

double HAL_GetMatchTime ( int32_t * status)

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). Warning: This is not an official time (so it cannot be used to dispute ref calls or guarantee that a function will trigger before the match ends).

When connected to the real field, this number only changes in full integer increments, and always counts down.

When the DS is in practice mode, this number is a floating point number, and counts down.

When the DS is in teleop or autonomous mode, this number returns -1.0.

Simulation matches DS behavior without an FMS connected.

Parameters
[out]statusthe error code, or 0 for success
Returns
Time remaining in current match period (auto or teleop) in seconds

◆ HAL_GetOutputsEnabled()

HAL_Bool HAL_GetOutputsEnabled ( void )

Gets if outputs are enabled by the control system.

Returns
true if outputs are enabled

◆ HAL_GetUncachedControlWord()

int32_t HAL_GetUncachedControlWord ( HAL_ControlWord * controlWord)

Gets the current control word of the driver station.

Unlike HAL_GetControlWord, this function gets the latest value rather than using the value cached by HAL_RefreshDSData().

The control word contains the robot state.

Parameters
controlWordthe control word (out)
Returns
the error code, or 0 for success

◆ HAL_MakeControlWord()

HAL_ControlWord HAL_MakeControlWord ( int64_t opModeHash,
HAL_RobotMode robotMode,
HAL_Bool enabled,
HAL_Bool eStop,
HAL_Bool fmsAttached,
HAL_Bool dsAttached )
inline

◆ HAL_MakeOpModeId()

int64_t HAL_MakeOpModeId ( HAL_RobotMode mode,
int64_t hash )
inline

◆ HAL_ObserveUserProgram()

void HAL_ObserveUserProgram ( HAL_ControlWord word)

Sets the control word state returned to the DS.

This is used for the DS to ensure the robot is properly responding to its state request. Ensure this gets called about every 50ms, or the robot will be disabled by the DS.

Parameters
wordcontrol word returned by HAL_GetControlWord

◆ HAL_ObserveUserProgramStarting()

void HAL_ObserveUserProgramStarting ( void )

Sets the program starting flag in the DS.

This is what changes the DS to showing robot code ready.

◆ HAL_OpMode_GetHash()

int64_t HAL_OpMode_GetHash ( int64_t id)
inline

◆ HAL_OpMode_GetRobotMode()

HAL_RobotMode HAL_OpMode_GetRobotMode ( int64_t id)
inline

◆ HAL_ProvideNewDataEventHandle()

void HAL_ProvideNewDataEventHandle ( WPI_EventHandle handle)

Adds an event handle to be signalled when new data arrives.

Parameters
handlethe event handle to be signalled

◆ HAL_RefreshDSData()

HAL_Bool HAL_RefreshDSData ( void )

Refresh the DS control word.

Returns
true if updated

◆ HAL_RemoveNewDataEventHandle()

void HAL_RemoveNewDataEventHandle ( WPI_EventHandle handle)

Removes the event handle from being signalled when new data arrives.

Parameters
handlethe event handle to remove

◆ HAL_SendConsoleLine()

int32_t HAL_SendConsoleLine ( const char * line)

Sends a line to the driver station console.

Parameters
linethe line to send (null terminated)
Returns
the error code, or 0 for success

◆ HAL_SendError()

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.

Parameters
isErrortrue for error, false for warning
errorCodethe error code
isLVCodetrue for a LV error code, false for a standard error code
detailsthe details of the error
locationthe file location of the error
callStackthe callstack of the error
printMsgtrue to print the error message to stdout as well as to the DS
Returns
the error code, or 0 for success

◆ HAL_SetJoystickLeds()

int32_t HAL_SetJoystickLeds ( int32_t joystickNum,
int32_t leds )

Set joystick LEDs.

Parameters
joystickNumthe joystick number
ledsthe rgb led color value (0xRRGGBB)
Returns
the error code, or 0 for success

◆ HAL_SetJoystickRumble()

int32_t HAL_SetJoystickRumble ( int32_t joystickNum,
int32_t leftRumble,
int32_t rightRumble,
int32_t leftTriggerRumble,
int32_t rightTriggerRumble )

Set joystick rumbles.

Parameters
joystickNumthe joystick number
leftRumblethe left rumble value (0-FFFF)
rightRumblethe right rumble value (0-FFFF)
leftTriggerRumblethe left trigger rumble value (0-FFFF)
rightTriggerRumblethe right trigger rumble value (0-FFFF)
Returns
the error code, or 0 for success

◆ HAL_SetOpModeOptions()

int32_t HAL_SetOpModeOptions ( const struct HAL_OpModeOption * options,
int32_t count )

Sets operating mode options.

Parameters
optionsarray of operating mode options
countnumber of options in the array
Returns
the error code, or 0 for success

◆ HAL_SetPrintErrorImpl()

void HAL_SetPrintErrorImpl ( void(* func )(const char *line, size_t size))

Set the print function used by HAL_SendError.

Parameters
funcFunction called by HAL_SendError when stderr is printed