mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-24 01:31:46 +00:00
[sim] Add support for disabling SimDevices (#2568)
This allows disabling/enabling SimDevices via prefix matching. This can be used to force devices that normally use SimDevice in simulation mode to instead talk directly to the hardware as in normal operation.
This commit is contained in:
@@ -11,6 +11,9 @@ import edu.wpi.first.hal.HALValue;
|
||||
import edu.wpi.first.hal.JNIWrapper;
|
||||
|
||||
public class SimDeviceDataJNI extends JNIWrapper {
|
||||
public static native void setSimDeviceEnabled(String prefix, boolean enabled);
|
||||
public static native boolean isSimDeviceEnabled(String name);
|
||||
|
||||
public static native int registerSimDeviceCreatedCallback(String prefix, SimDeviceCallback callback, boolean initialNotify);
|
||||
public static native void cancelSimDeviceCreatedCallback(int uid);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user