mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +00:00
Add ability to associate other devices with a SimDevice
Implemented only for AnalogInput, DIO, and Encoder.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2016-2018 FIRST. All Rights Reserved. */
|
||||
/* Copyright (c) 2016-2019 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
@@ -46,6 +46,8 @@ public class AnalogJNI extends JNIWrapper {
|
||||
|
||||
public static native boolean checkAnalogOutputChannel(int channel);
|
||||
|
||||
public static native void setAnalogInputSimDevice(int handle, int device);
|
||||
|
||||
public static native void setAnalogOutput(int portHandle, double voltage);
|
||||
|
||||
public static native double getAnalogOutput(int portHandle);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2016-2018 FIRST. All Rights Reserved. */
|
||||
/* Copyright (c) 2016-2019 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
@@ -15,6 +15,8 @@ public class DIOJNI extends JNIWrapper {
|
||||
|
||||
public static native void freeDIOPort(int dioPortHandle);
|
||||
|
||||
public static native void setDIOSimDevice(int handle, int device);
|
||||
|
||||
// TODO(Thad): Switch this to use boolean
|
||||
public static native void setDIO(int dioPortHandle, short value);
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2016-2018 FIRST. All Rights Reserved. */
|
||||
/* Copyright (c) 2016-2019 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
@@ -14,6 +14,8 @@ public class EncoderJNI extends JNIWrapper {
|
||||
|
||||
public static native void freeEncoder(int encoderHandle);
|
||||
|
||||
public static native void setEncoderSimDevice(int handle, int device);
|
||||
|
||||
public static native int getEncoder(int encoderHandle);
|
||||
|
||||
public static native int getEncoderRaw(int encoderHandle);
|
||||
|
||||
Reference in New Issue
Block a user