mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-24 01:31:46 +00:00
[hal,wpilib] Add function to control "Radio" LED (#6073)
This commit is contained in:
28
hal/src/main/java/edu/wpi/first/hal/LEDJNI.java
Normal file
28
hal/src/main/java/edu/wpi/first/hal/LEDJNI.java
Normal file
@@ -0,0 +1,28 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.hal;
|
||||
|
||||
public class LEDJNI extends JNIWrapper {
|
||||
public static final int RADIO_LED_STATE_OFF = 0;
|
||||
public static final int RADIO_LED_STATE_GREEN = 1;
|
||||
public static final int RADIO_LED_STATE_RED = 2;
|
||||
public static final int RADIO_LED_STATE_ORANGE = 3;
|
||||
|
||||
/**
|
||||
* Set the state of the "Radio" LED.
|
||||
*
|
||||
* @param state The state to set the LED to.
|
||||
* @see "HAL_SetRadioLEDState"
|
||||
*/
|
||||
public static native void setRadioLEDState(int state);
|
||||
|
||||
/**
|
||||
* Get the state of the "Radio" LED.
|
||||
*
|
||||
* @return The state of the LED.
|
||||
* @see "HAL_GetRadioLEDState"
|
||||
*/
|
||||
public static native int getRadioLEDState();
|
||||
}
|
||||
@@ -176,5 +176,14 @@ public class RoboRioDataJNI extends JNIWrapper {
|
||||
|
||||
public static native void setComments(String comments);
|
||||
|
||||
public static native int registerRadioLEDStateCallback(
|
||||
NotifyCallback callback, boolean initialNotify);
|
||||
|
||||
public static native void cancelRadioLEDStateCallback(int uid);
|
||||
|
||||
public static native int getRadioLEDState();
|
||||
|
||||
public static native void setRadioLEDState(int state);
|
||||
|
||||
public static native void resetData();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user