[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:
Thad House
2022-09-02 16:49:42 -07:00
committed by GitHub
parent 59e6706b75
commit a5df391166
9 changed files with 88 additions and 19 deletions

View File

@@ -80,12 +80,15 @@ public class DigitalOutput extends DigitalSource implements Sendable {
}
/**
* Generate a single pulse. There can only be a single pulse going at any time.
* Output a single pulse on the digital output line.
*
* @param pulseLength The length of the pulse.
* <p>Send a single pulse on the digital output line where the pulse duration is specified in
* seconds. Maximum of 65535 microseconds.
*
* @param pulseLengthSeconds The pulse length in seconds
*/
public void pulse(final double pulseLength) {
DIOJNI.pulse(m_handle, pulseLength);
public void pulse(final double pulseLengthSeconds) {
DIOJNI.pulse(m_handle, pulseLengthSeconds);
}
/**