15// Define constants used for reading CVs from the Programming Track
16
17#define ACK_BASE_COUNT 100 // number of analogRead samples to take before each CV verify to establish a baseline current
18#define ACK_SAMPLE_COUNT 500 // number of analogRead samples to take when monitoring current after a CV verify (bit or byte) has been sent
19#define ACK_SAMPLE_SMOOTHING 0.2 // exponential smoothing to use in processing the analogRead samples after a CV verify (bit or byte) has been sent
20#define ACK_SAMPLE_THRESHOLD 30 // the threshold that the exponentially-smoothed analogRead samples (after subtracting the baseline current) must cross to establish ACKNOWLEDGEMENT
21
22// Define a series of registers that can be sequentially accessed over a loop to generate a repeating series of DCC Packets