mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
[wpilib] Counter: Fix default distance per pulse, add distance and rate to C++ (#5796)
- Default distance per pulse in java was 0; 1 is a more reasonable default - C++ was missing this functionality
This commit is contained in:
@@ -51,7 +51,7 @@ public class Counter implements CounterBase, Sendable, AutoCloseable {
|
||||
private boolean m_allocatedDownSource;
|
||||
int m_counter; // /< The FPGA counter object.
|
||||
private int m_index; // /< The index of this counter.
|
||||
private double m_distancePerPulse; // distance of travel for each tick
|
||||
private double m_distancePerPulse = 1; // distance of travel for each tick
|
||||
|
||||
/**
|
||||
* Create an instance of a counter with the given mode.
|
||||
|
||||
Reference in New Issue
Block a user