mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
Add ability to associate other devices with a SimDevice
Implemented only for AnalogInput, DIO, and Encoder.
This commit is contained in:
@@ -118,6 +118,19 @@ Java_edu_wpi_first_hal_AnalogJNI_checkAnalogOutputChannel
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_hal_AnalogJNI
|
||||
* Method: setAnalogInputSimDevice
|
||||
* Signature: (II)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL
|
||||
Java_edu_wpi_first_hal_AnalogJNI_setAnalogInputSimDevice
|
||||
(JNIEnv* env, jclass, jint handle, jint device)
|
||||
{
|
||||
HAL_SetAnalogInputSimDevice((HAL_AnalogInputHandle)handle,
|
||||
(HAL_SimDeviceHandle)device);
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_hal_AnalogJNI
|
||||
* Method: setAnalogOutput
|
||||
|
||||
@@ -61,6 +61,18 @@ Java_edu_wpi_first_hal_DIOJNI_freeDIOPort
|
||||
HAL_FreeDIOPort((HAL_DigitalHandle)id);
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_hal_DIOJNI
|
||||
* Method: setDIOSimDevice
|
||||
* Signature: (II)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL
|
||||
Java_edu_wpi_first_hal_DIOJNI_setDIOSimDevice
|
||||
(JNIEnv* env, jclass, jint handle, jint device)
|
||||
{
|
||||
HAL_SetDIOSimDevice((HAL_DigitalHandle)handle, (HAL_SimDeviceHandle)device);
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_hal_DIOJNI
|
||||
* Method: setDIO
|
||||
|
||||
@@ -54,6 +54,19 @@ Java_edu_wpi_first_hal_EncoderJNI_freeEncoder
|
||||
CheckStatus(env, status);
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_hal_EncoderJNI
|
||||
* Method: setEncoderSimDevice
|
||||
* Signature: (II)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL
|
||||
Java_edu_wpi_first_hal_EncoderJNI_setEncoderSimDevice
|
||||
(JNIEnv* env, jclass, jint handle, jint device)
|
||||
{
|
||||
HAL_SetEncoderSimDevice((HAL_EncoderHandle)handle,
|
||||
(HAL_SimDeviceHandle)device);
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_hal_EncoderJNI
|
||||
* Method: getEncoder
|
||||
|
||||
Reference in New Issue
Block a user