Often behaviour of some outputs or inputs needs to be configured to depend on other parameters. Sometimes it required tricky logic to set up all the required functionality.
Variations of outside conditions that can influence I/O include switching modes using buttons or encoders, switching modes or disabling outputs based on dataref value, such as insufficient power, and so on.
In SimVimCockpit Interface, the whole logic for these functions was reworked to make them all unified and allow greater control over various conditions. The main idea now is that each config line can by dynamically enabled or disabled.
For example, you may have 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 button or buttons, or some switch can become
You may need a display (LCD, 7-segment) to be used for output different data or be turned off depending on some data values. Such condition, for example, can be used to disable a 7-segment radio display when the power failure has occured in the simulator, along with any encoders and buttons associated with it.
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.
Example: You have a mode button on pin 5 and mode switch on pin 6:
B5 Mode_Button S6 Mode_Switch
Mode switch has 2 states. Mode button can have more than 2 states, and cycles through them with each click. Default is 2. To increase the number of states the button has, add the "n" option to it with the desired number. For example:
B5 Mode_Button n=4
Use the "c" option in the controlled I/O config lines to link them to the mode button/switch state. For example:
E10 Some_Param_Set c=B5:1 E10 Some_Param_Set c=B5:2 E10 Some_Param_Set c=B5:3 E10 Some_Param_Set c=B5:4 E12 Com1_k25_Set c=S6:1 E12 Com1_Mhz_Set c=S6:2
For the Mode_Switch, state 1 is OFF, and state 2 is ON. Some other, more convenient ways of linking the mode buttons with the controlled parameters may also be added later.
Conditions are placed in the configuration file under the [Conditions] category, and can be used to enable and disable inputs or outputs based on the value of a specified dataref. The dataref conditions can be used intermittently with mode buttons for determining the working state of a particular config line.
Any config line can have any combination of conditions the determine if this line is "Active". For example, if an output has the option "c=B6:2,C1>10", that means that this output will only work when the mode button B6 is in mode state 2, and the value of the dataref specified in Condition 1 is greater than 10.
First, mark the "Assign condition parameters" checkbox to switch into condition assignment mode, and select any of the output parameters to act as condition. Then, return to normal configuration mode, and when you assign a new input or output, you'll be able to select the "Link to conditions" option before selecting a pin, which will allow you to link any of the assigned conditions to this parameter, so that this paramater will only be active in your configuration when these conditions are met.
Select a condition parameter from the list, select the comparison type and type in the value to compare it to, and click "Add condition". The condition for this parameter will be added to the list, and you can add several other conditions to it this way, so that the parameter will only be active when all conditions are met.
If you've added mode buttons or mode switches to your configuration, they will also be available as conditions for other parameters.
The [Startup] section of the configuration file allows you to list the parameters to be set at simulator startup. This function is rarely required and not included in the Configurator. You can add this manually (using any pre-defined SimVim names) in your data file, for example:
[Startup]====================== Instr_Brightness_1_Set v=0.5
This will set instrument brightness value to 0.5 when X-Plane starts. If you reload SimVimCockpit configuration while X-Plane is running, startup parameters that were already set will not be changed again. Only new parameters that you add into the Startup section will be set when you reload the configuration.