WPILibC++ 2024.3.2
Power Functions

Functions

double HAL_GetVinVoltage (int32_t *status)
 Gets the roboRIO input voltage. More...
 
double HAL_GetVinCurrent (int32_t *status)
 Gets the roboRIO input current. More...
 
double HAL_GetUserVoltage6V (int32_t *status)
 Gets the 6V rail voltage. More...
 
double HAL_GetUserCurrent6V (int32_t *status)
 Gets the 6V rail current. More...
 
HAL_Bool HAL_GetUserActive6V (int32_t *status)
 Gets the active state of the 6V rail. More...
 
int32_t HAL_GetUserCurrentFaults6V (int32_t *status)
 Gets the fault count for the 6V rail. More...
 
void HAL_SetUserRailEnabled6V (HAL_Bool enabled, int32_t *status)
 Enables or disables the 6V rail. More...
 
double HAL_GetUserVoltage5V (int32_t *status)
 Gets the 5V rail voltage. More...
 
double HAL_GetUserCurrent5V (int32_t *status)
 Gets the 5V rail current. More...
 
HAL_Bool HAL_GetUserActive5V (int32_t *status)
 Gets the active state of the 5V rail. More...
 
int32_t HAL_GetUserCurrentFaults5V (int32_t *status)
 Gets the fault count for the 5V rail. More...
 
void HAL_SetUserRailEnabled5V (HAL_Bool enabled, int32_t *status)
 Enables or disables the 5V rail. More...
 
double HAL_GetUserVoltage3V3 (int32_t *status)
 Gets the 3V3 rail voltage. More...
 
double HAL_GetUserCurrent3V3 (int32_t *status)
 Gets the 3V3 rail current. More...
 
HAL_Bool HAL_GetUserActive3V3 (int32_t *status)
 Gets the active state of the 3V3 rail. More...
 
int32_t HAL_GetUserCurrentFaults3V3 (int32_t *status)
 Gets the fault count for the 3V3 rail. More...
 
void HAL_SetUserRailEnabled3V3 (HAL_Bool enabled, int32_t *status)
 Enables or disables the 3V3 rail. More...
 
double HAL_GetBrownoutVoltage (int32_t *status)
 Get the current brownout voltage setting. More...
 
void HAL_SetBrownoutVoltage (double voltage, int32_t *status)
 Set the voltage the roboRIO will brownout and disable all outputs. More...
 
double HAL_GetCPUTemp (int32_t *status)
 Get the current CPU temperature in degrees Celsius. More...
 

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_GetUserActive5V()

HAL_Bool HAL_GetUserActive5V ( int32_t *  status)

Gets the active state of the 5V rail.

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

◆ HAL_GetUserActive6V()

HAL_Bool HAL_GetUserActive6V ( int32_t *  status)

Gets the active state of the 6V 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_GetUserCurrent5V()

double HAL_GetUserCurrent5V ( int32_t *  status)

Gets the 5V rail current.

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

◆ HAL_GetUserCurrent6V()

double HAL_GetUserCurrent6V ( int32_t *  status)

Gets the 6V rail current.

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

◆ HAL_GetUserCurrentFaults3V3()

int32_t HAL_GetUserCurrentFaults3V3 ( int32_t *  status)

Gets the fault count for the 3V3 rail.

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

◆ HAL_GetUserCurrentFaults5V()

int32_t HAL_GetUserCurrentFaults5V ( int32_t *  status)

Gets the fault count for the 5V rail.

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

◆ HAL_GetUserCurrentFaults6V()

int32_t HAL_GetUserCurrentFaults6V ( int32_t *  status)

Gets the fault count for the 6V rail.

Parameters
[out]statusthe error code, or 0 for success
Returns
the number of 6V 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_GetUserVoltage5V()

double HAL_GetUserVoltage5V ( int32_t *  status)

Gets the 5V rail voltage.

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

◆ HAL_GetUserVoltage6V()

double HAL_GetUserVoltage6V ( int32_t *  status)

Gets the 6V rail voltage.

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

◆ HAL_GetVinCurrent()

double HAL_GetVinCurrent ( int32_t *  status)

Gets the roboRIO input current.

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

◆ 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_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

◆ HAL_SetUserRailEnabled5V()

void HAL_SetUserRailEnabled5V ( HAL_Bool  enabled,
int32_t *  status 
)

Enables or disables the 5V rail.

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

◆ HAL_SetUserRailEnabled6V()

void HAL_SetUserRailEnabled6V ( HAL_Bool  enabled,
int32_t *  status 
)

Enables or disables the 6V rail.

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