Package edu.wpi.first.hal
Class PowerJNI
java.lang.Object
edu.wpi.first.hal.JNIWrapper
edu.wpi.first.hal.PowerJNI
Power HAL JNI Functions.
- See Also:
-
- "Power.h"
-
Nested Class Summary
Nested classes/interfaces inherited from class edu.wpi.first.hal.JNIWrapper
JNIWrapper.Helper
-
Method Summary
Modifier and TypeMethodDescriptionstatic double
Get the current brownout voltage setting.static double
Get the current CPU temperature in degrees Celsius.static boolean
Gets the active state of the 3V3 rail.static double
Gets the 3V3 rail current.static int
Gets the fault count for the 3V3 rail.static double
Gets the 3V3 rail voltage.static double
Gets the roboRIO input voltage.static void
Resets the overcurrent fault counters for all user rails to 0.static void
setBrownoutVoltage
(double voltage) Set the voltage the roboRIO will brownout and disable all outputs.static void
setUserEnabled3V3
(boolean enabled) Enables or disables the 3V3 rail.Methods inherited from class edu.wpi.first.hal.JNIWrapper
forceLoad, suppressUnused
-
Method Details
-
getVinVoltage
Gets the roboRIO input voltage.- Returns:
- the input voltage (volts)
- See Also:
-
- "HAL_GetVinVoltage"
-
getUserVoltage3V3
Gets the 3V3 rail voltage.- Returns:
- the 3V3 rail voltage (volts)
- See Also:
-
- "HAL_GetUserVoltage3V3"
-
getUserCurrent3V3
Gets the 3V3 rail current.- Returns:
- the 3V3 rail current (amps)
- See Also:
-
- "HAL_GetUserCurrent3V3"
-
setUserEnabled3V3
Enables or disables the 3V3 rail.- Parameters:
enabled
- whether the rail should be enabled
-
getUserActive3V3
Gets the active state of the 3V3 rail.- Returns:
- true if the rail is active, otherwise false
- See Also:
-
- "HAL_GetUserActive3V3"
-
getUserCurrentFaults3V3
Gets the fault count for the 3V3 rail.- Returns:
- the number of 3V3 fault counts
- See Also:
-
- "HAL_GetUserCurrentFaults3V3"
-
resetUserCurrentFaults
Resets the overcurrent fault counters for all user rails to 0. -
setBrownoutVoltage
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:
voltage
- The brownout voltage- See Also:
-
- "HAL_SetBrownoutVoltage"
-
getBrownoutVoltage
Get the current brownout voltage setting.- Returns:
- The brownout voltage
- See Also:
-
- "HAL_GetBrownoutVoltage"
-
getCPUTemp
Get the current CPU temperature in degrees Celsius.- Returns:
- current CPU temperature in degrees Celsius
-