Class PowerJNI
java.lang.Object
org.wpilib.hardware.hal.JNIWrapper
org.wpilib.hardware.hal.PowerJNI
-
Nested Class Summary
Nested classes/interfaces inherited from class JNIWrapper
JNIWrapper.Helper -
Method Summary
Modifier and TypeMethodDescriptionstatic doubleGet the current CPU temperature in degrees Celsius.static booleanGets the active state of the 3V3 rail.static doubleGets the 3V3 rail current.static intGets the fault count for the 3V3 rail.static doubleGets the 3V3 rail voltage.static doubleGets the Systemcore input voltage.static voidResets the overcurrent fault counters for all user rails to 0.static voidsetBrownoutVoltages(double brownoutVoltage, double recoveryVoltage) Set the voltages where the Systemcore will enter and recover from brownout.static voidsetUserEnabled3V3(boolean enabled) Enables or disables the 3V3 rail.Methods inherited from class JNIWrapper
forceLoad, suppressUnused
-
Method Details
-
getVinVoltage
public static double getVinVoltage()Gets the Systemcore input voltage.- Returns:
- the input voltage (volts)
- See Also:
-
getUserVoltage3V3
public static double getUserVoltage3V3()Gets the 3V3 rail voltage.- Returns:
- the 3V3 rail voltage (volts)
- See Also:
-
getUserCurrent3V3
public static double getUserCurrent3V3()Gets the 3V3 rail current.- Returns:
- the 3V3 rail current (amps)
- See Also:
-
setUserEnabled3V3
public static void setUserEnabled3V3(boolean enabled) Enables or disables the 3V3 rail.- Parameters:
enabled- whether the rail should be enabled
-
getUserActive3V3
public static boolean getUserActive3V3()Gets the active state of the 3V3 rail.- Returns:
- true if the rail is active, otherwise false
- See Also:
-
getUserCurrentFaults3V3
public static int getUserCurrentFaults3V3()Gets the fault count for the 3V3 rail.- Returns:
- the number of 3V3 fault counts
- See Also:
-
resetUserCurrentFaults
public static void resetUserCurrentFaults()Resets the overcurrent fault counters for all user rails to 0. -
setBrownoutVoltages
public static void setBrownoutVoltages(double brownoutVoltage, double recoveryVoltage) Set the voltages where the Systemcore will enter and recover from brownout.- Parameters:
brownoutVoltage- the voltage where the Systemcore will enter brownoutrecoveryVoltage- the voltage where the Systemcore will recover from brownout- See Also:
-
getCPUTemp
public static double getCPUTemp()Get the current CPU temperature in degrees Celsius.- Returns:
- current CPU temperature in degrees Celsius
-