-
Notifications
You must be signed in to change notification settings - Fork 23
BcdWheel
Talbot edited this page Nov 30, 2021
·
2 revisions
BcdWheelT
Binary Coded Decimal (BCD) switch used for numeric entry.
BcdWheel
BcdWheelT(const char* msg, char pinA, char pinB, char pinC=0, char pinD=0)
- msg - The message to send to DCS when the value is changed.
- pinA - The pin connected to the Least Significant Digit.
- pinB - The pin connected to the second Least Significant Digit.
- pinC - [OPTIONAL] The pin connected to the third Least Significant Digit, expanding the range from 4 to 8.
- pinD - [OPTIONAL] The pin connected to the fourth Least Significant Digit, expanding the range from 8 to 16.
template <unsigned long pollIntervalMs = POLL_EVERY_TIME>
- pollIntervalMs - Time in milliseconds between times this control should be sampled. Increase for less time sensitive controls to lower the CPU load required for this control.
DcsBios::BcdWheel iffMode1Wheel1("IFF_MODE1_WHEEL1", 25, 24, 21); // IFF Mode-1 Wheel 1 on pins 25, 24 and 21 for digit bits 0, 1 and 2 respectively.
typedef DcsBios::BcdWheelT<200> LowPriorityBcdWheel; // A custom BCD control that will use less cpu on each loop
LowPriorityBcdWheel("IFF_MODE3A_WHEEL4", 42, 43, 44);