mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-24 01:31:46 +00:00
[hal] Expose power rail disable and cpu temp functionality (#5477)
This commit is contained in:
@@ -42,6 +42,13 @@ public class PowerJNI extends JNIWrapper {
|
||||
*/
|
||||
public static native double getUserCurrent6V();
|
||||
|
||||
/**
|
||||
* Enables or disables the 6V rail.
|
||||
*
|
||||
* @param enabled whether the rail should be enabled
|
||||
*/
|
||||
public static native void setUserEnabled6V(boolean enabled);
|
||||
|
||||
/**
|
||||
* Gets the active state of the 6V rail.
|
||||
*
|
||||
@@ -74,6 +81,13 @@ public class PowerJNI extends JNIWrapper {
|
||||
*/
|
||||
public static native double getUserCurrent5V();
|
||||
|
||||
/**
|
||||
* Enables or disables the 5V rail.
|
||||
*
|
||||
* @param enabled whether the rail should be enabled
|
||||
*/
|
||||
public static native void setUserEnabled5V(boolean enabled);
|
||||
|
||||
/**
|
||||
* Gets the active state of the 5V rail.
|
||||
*
|
||||
@@ -106,6 +120,13 @@ public class PowerJNI extends JNIWrapper {
|
||||
*/
|
||||
public static native double getUserCurrent3V3();
|
||||
|
||||
/**
|
||||
* Enables or disables the 3V3 rail.
|
||||
*
|
||||
* @param enabled whether the rail should be enabled
|
||||
*/
|
||||
public static native void setUserEnabled3V3(boolean enabled);
|
||||
|
||||
/**
|
||||
* Gets the active state of the 3V3 rail.
|
||||
*
|
||||
@@ -139,4 +160,11 @@ public class PowerJNI extends JNIWrapper {
|
||||
* @see "HAL_GetBrownoutVoltage"
|
||||
*/
|
||||
public static native double getBrownoutVoltage();
|
||||
|
||||
/**
|
||||
* Get the current CPU temperature in degrees Celsius.
|
||||
*
|
||||
* @return current CPU temperature in degrees Celsius
|
||||
*/
|
||||
public static native double getCPUTemp();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user