[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

@@ -164,8 +164,8 @@ class Ultrasonic : public wpi::Sendable,
*/
static void UltrasonicChecker();
// Time (sec) for the ping trigger pulse.
static constexpr double kPingTime = 10 * 1e-6;
// Time (usec) for the ping trigger pulse.
static constexpr auto kPingTime = 10_us;
// Max time (ms) between readings.
static constexpr auto kMaxUltrasonicTime = 0.1_s;