mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-24 01:31:46 +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:
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user