-
Notifications
You must be signed in to change notification settings - Fork 23
AnalogMultiPos
Talbot edited this page Nov 25, 2021
·
1 revision
AnalogMultiPosT
Used to have an analog device such as a potentiometer act as an multi position (ON-OFF) switch in DCS.
AnalogMultiPos
AnalogMultiPosT(const char *msg, char pin, char numOfSteps_)
- msg - The message to send to DCS when the switch position is changed.
- pin - The analog pin connected to the control.
- numOfSets - The number of sections to divide the analog range into. Steps start at "0" and go to "numOfSteps-1" and send the corresponding value to DCS.
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::AnalogMultiPos("TACAN_MODE", 1, 5); // An analog device connected to pin 1 to send the 5 possible values for TACAN_MODE
typedef DcsBios::AnalogMultiPosT<200> LowPriorityAnalogMultiPos; // A custom template instantiation that will use less cpu on each loop
LowPriorityAnalogMultiPos("AAP_PAGE", 1, 5);