mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[wpilib][hal] PWM Raw using microseconds (#5283)
Co-authored-by: Joe <sciencewhiz@users.noreply.github.com>
This commit is contained in:
@@ -64,52 +64,52 @@ Java_edu_wpi_first_hal_simulation_PWMDataJNI_setInitialized
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_hal_simulation_PWMDataJNI
|
||||
* Method: registerRawValueCallback
|
||||
* Method: registerPulseMicrosecondCallback
|
||||
* Signature: (ILjava/lang/Object;Z)I
|
||||
*/
|
||||
JNIEXPORT jint JNICALL
|
||||
Java_edu_wpi_first_hal_simulation_PWMDataJNI_registerRawValueCallback
|
||||
Java_edu_wpi_first_hal_simulation_PWMDataJNI_registerPulseMicrosecondCallback
|
||||
(JNIEnv* env, jclass, jint index, jobject callback, jboolean initialNotify)
|
||||
{
|
||||
return sim::AllocateCallback(env, index, callback, initialNotify,
|
||||
&HALSIM_RegisterPWMRawValueCallback);
|
||||
&HALSIM_RegisterPWMPulseMicrosecondCallback);
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_hal_simulation_PWMDataJNI
|
||||
* Method: cancelRawValueCallback
|
||||
* Method: cancelPulseMicrosecondCallback
|
||||
* Signature: (II)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL
|
||||
Java_edu_wpi_first_hal_simulation_PWMDataJNI_cancelRawValueCallback
|
||||
Java_edu_wpi_first_hal_simulation_PWMDataJNI_cancelPulseMicrosecondCallback
|
||||
(JNIEnv* env, jclass, jint index, jint handle)
|
||||
{
|
||||
return sim::FreeCallback(env, handle, index,
|
||||
&HALSIM_CancelPWMRawValueCallback);
|
||||
&HALSIM_CancelPWMPulseMicrosecondCallback);
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_hal_simulation_PWMDataJNI
|
||||
* Method: getRawValue
|
||||
* Method: getPulseMicrosecond
|
||||
* Signature: (I)I
|
||||
*/
|
||||
JNIEXPORT jint JNICALL
|
||||
Java_edu_wpi_first_hal_simulation_PWMDataJNI_getRawValue
|
||||
Java_edu_wpi_first_hal_simulation_PWMDataJNI_getPulseMicrosecond
|
||||
(JNIEnv*, jclass, jint index)
|
||||
{
|
||||
return HALSIM_GetPWMRawValue(index);
|
||||
return HALSIM_GetPWMPulseMicrosecond(index);
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_hal_simulation_PWMDataJNI
|
||||
* Method: setRawValue
|
||||
* Method: setPulseMicrosecond
|
||||
* Signature: (II)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL
|
||||
Java_edu_wpi_first_hal_simulation_PWMDataJNI_setRawValue
|
||||
Java_edu_wpi_first_hal_simulation_PWMDataJNI_setPulseMicrosecond
|
||||
(JNIEnv*, jclass, jint index, jint value)
|
||||
{
|
||||
HALSIM_SetPWMRawValue(index, value);
|
||||
HALSIM_SetPWMPulseMicrosecond(index, value);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user