WPILibC++ 2027.0.0-alpha-2
Loading...
Searching...
No Matches
Power Functions

Functions

double HAL_GetVinVoltage (int32_t *status)
 Gets the roboRIO input voltage.
 
double HAL_GetUserVoltage3V3 (int32_t *status)
 Gets the 3V3 rail voltage.
 
double HAL_GetUserCurrent3V3 (int32_t *status)
 Gets the 3V3 rail current.
 
HAL_Bool HAL_GetUserActive3V3 (int32_t *status)
 Gets the active state of the 3V3 rail.
 
int32_t HAL_GetUserCurrentFaults3V3 (int32_t *status)
 Gets the fault count for the 3V3 rail.
 
void HAL_SetUserRailEnabled3V3 (HAL_Bool enabled, int32_t *status)
 Enables or disables the 3V3 rail.
 
void HAL_ResetUserCurrentFaults (int32_t *status)
 Resets the overcurrent fault counters for all user rails to 0.
 
double HAL_GetBrownoutVoltage (int32_t *status)
 Get the current brownout voltage setting.
 
void HAL_SetBrownoutVoltage (double voltage, int32_t *status)
 Set the voltage the roboRIO will brownout and disable all outputs.
 
double HAL_GetCPUTemp (int32_t *status)
 Get the current CPU temperature in degrees Celsius.
 

Detailed Description

Function Documentation

◆ HAL_GetBrownoutVoltage()

double HAL_GetBrownoutVoltage ( int32_t * status)

Get the current brownout voltage setting.

Parameters
[out]statusthe error code, or 0 for success
Returns
The brownout voltage

◆ HAL_GetCPUTemp()

double HAL_GetCPUTemp ( int32_t * status)

Get the current CPU temperature in degrees Celsius.

Parameters
[out]statusthe error code, or 0 for success
Returns
current CPU temperature in degrees Celsius

◆ HAL_GetUserActive3V3()

HAL_Bool HAL_GetUserActive3V3 ( int32_t * status)

Gets the active state of the 3V3 rail.

Parameters
[out]statusthe error code, or 0 for success
Returns
true if the rail is active, otherwise false

◆ HAL_GetUserCurrent3V3()

double HAL_GetUserCurrent3V3 ( int32_t * status)

Gets the 3V3 rail current.

Parameters
[out]statusthe error code, or 0 for success
Returns
the 3V3 rail current (amps)

◆ HAL_GetUserCurrentFaults3V3()

int32_t HAL_GetUserCurrentFaults3V3 ( int32_t * status)

Gets the fault count for the 3V3 rail.

Capped at 255.

Parameters
[out]statusthe error code, or 0 for success
Returns
the number of 3V3 fault counts

◆ HAL_GetUserVoltage3V3()

double HAL_GetUserVoltage3V3 ( int32_t * status)

Gets the 3V3 rail voltage.

Parameters
[out]statusthe error code, or 0 for success
Returns
the 3V3 rail voltage (volts)

◆ HAL_GetVinVoltage()

double HAL_GetVinVoltage ( int32_t * status)

Gets the roboRIO input voltage.

Parameters
[out]statusthe error code, or 0 for success
Returns
the input voltage (volts)

◆ HAL_ResetUserCurrentFaults()

void HAL_ResetUserCurrentFaults ( int32_t * status)

Resets the overcurrent fault counters for all user rails to 0.

Parameters
[out]statusthe error code, or 0 for success

◆ HAL_SetBrownoutVoltage()

void HAL_SetBrownoutVoltage ( double voltage,
int32_t * status )

Set the voltage the roboRIO will brownout and disable all outputs.

Note that this only does anything on the roboRIO 2. On the roboRIO it is a no-op.

Parameters
[in]voltageThe brownout voltage
[out]statusthe error code, or 0 for success

◆ HAL_SetUserRailEnabled3V3()

void HAL_SetUserRailEnabled3V3 ( HAL_Bool enabled,
int32_t * status )

Enables or disables the 3V3 rail.

Parameters
enabledwhether the rail should be enabled
[out]statusthe error code, or 0 for success