WPILibC++ 2023.4.3-108-ge5452e3
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...
 
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...
 
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...
 
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...
 

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