Translate

Feb 2, 2018

Mode Switches and Conditions

One of the features of ArdSim and ArdSimX were switchable encoder modes. Sometimes they required tricky logic to set up all the required functionality.
For example, a common goal was configuring a single encoder for radio, which would switch between different COM/NAV (1 and 2) modes with a press of one button, and between MHz/KHz with a press of another, built-in button.
This required setting up 8 different encoder modes and two buttons that used different logic to switch the encoder's mode.

In addition to this, later versions of ArdSimX included an experimental feature with switchable output modes - for example, to output different data to a 7-segment display.

Needless to say, there can be a lot of cases where the specific functions of inputs and outputs need to be influenced by outside conditions. Variations include switching modes using buttons or encoders, switching modes or disabling outputs based on dataref value, such as insufficient power, and so on.

In the new SimVimCockpit Interface (previously ArdSimX.2), the whole logic for these functions was reworked to make them all unified and allow greater control over various conditions.

Imagine a configuration file with all the input and output config lines, as it looked in ArdSimX. The main idea now is that each config line can be dynamically enabled or disabled.
Unlike ArdSimX, now any line can have separate parameters indicating what mode number and what mode switch it corresponds to. A line can even have several mode switches configured to it, making things like the encoder example described earlier more easy to implement. In addition to this, logical conditions  with a dataref value can be used in place of a mode switch. Such condition, for example, can be used to disable a 7-segment radio display when it is powered off in the simulator, along with any encoders and buttons associated with it.

All this functionality is currently at an early stage in development. We will be working out the specifics along the way.