mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
[hal, wpilib] Fix up DIO pulse API (#4387)
The FPGA API takes microseconds directly, instead of a scaled value. Also add a new HAL level API to trigger multiple DIOs with the same pulse at once.
This commit is contained in:
@@ -144,6 +144,20 @@ Java_edu_wpi_first_hal_DIOJNI_pulse
|
||||
CheckStatus(env, status);
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_hal_DIOJNI
|
||||
* Method: pulseMultiple
|
||||
* Signature: (JD)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL
|
||||
Java_edu_wpi_first_hal_DIOJNI_pulseMultiple
|
||||
(JNIEnv* env, jclass, jlong channelMask, jdouble value)
|
||||
{
|
||||
int32_t status = 0;
|
||||
HAL_PulseMultiple(static_cast<uint32_t>(channelMask), value, &status);
|
||||
CheckStatus(env, status);
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_hal_DIOJNI
|
||||
* Method: isPulsing
|
||||
|
||||
Reference in New Issue
Block a user