!!! Data format described on this page are related to ArdSim library ONLY.
The latest ArdSimX Interface uses other configuration format.
The input configuration file is the list of commands or datarefs that will be sent to X-Plane on response to a button click or switch on/off action. Each direct input is represented by the prefix "D" with pin number and "+" or "-" symbols for on/off actions followed by the command/dataref controlled with this input.
To configure input as toggle switch use a pair of command lines with "+" for switch-On and "-" for switch-Off action:
To configure input as a button only one command line is needed with "+" or "-" sign depending of when the command will be executed - "on button push" or "on button release".Example: Nav1 stanby/active flip button. Command is sent when button is clicked (on-push):
D2+ sim/radios/nav1_standy_flipExample: Reset timer button. Command is sent when button is released after click :
The "on-release" action for button can be useful for some parameters, when you can think a little after the button is already clicked before you decide to release it and send command.
Also, this can be useful when some command always needs to be sent just after the previously initiated command (both +/- actions are used for one button):
You can assign more that one command to one button or switch action. Just add the line with the same input ID and another command after it:
In this example the timer will reset every time the landing gear switch is turned UP (not practical, just for example):
If there is no suitable command for some action or if you need to change the value of a specific dataref directly, you should specify the dataref string and its value in the config file (including custom datarefs). On the button or switch action the dataref will be set (changed) to this value or incremented.
In this example the button on digital pin 10 sets the dataref value (TOGA pith) to 15 degrees.
D10+ sim/cockpit2/autopilot/TOGA_pitch_deg 15
Adding the "+" or "-" sign at the end of the value you can increment or decrement the dataref by the given value with the assigned actuator, instead of setting the value. This is used for encoders, but sometimes you would need increment buttons for a dataref.Example: Artificial horizon pitch-reference adjustment, pilot side, two buttons on Arduino pin #6,7 are used (increment by 1 degr.):
D6+ sim/cockpit2/gauges/actuators/artificial_horizon_adjust_deg_pilot 1+
D7+ sim/cockpit2/gauges/actuators/artificial_horizon_adjust_deg_pilot 1-
D12+ sim/cockpit2/engine/actuators/prop_mode 0 2In this example we set the propeller of engine #2 to feather mode (0). And, there is no sutable command to replace this dataref.
This option can be useful for the "increment" command when a button sends the command once every time when it is clicked and starts to repeat the command continuously when held pressed for more than 1 second. For example, it can be a button to increment autopilot heading by 1 deg. ("sim/autopilot/heading_up").
Instead of "RepeatBtn" function previously used in the Arduino code, now you can just add one more "+" sign to the button ID that you want to act once on every click and then start repeating after 1 sec of hold. Here is example for the button on the pin #5 and button in the matrix node #23 ):D5++ sim/...../COMMAND_1
Now you don't need to configure "continued actions" with RepeatBtn() function, the commands that need to be sent repeatedly (such as starter and test buttons) are now handled automatically.
Note: You can use your old sketches written with previous library versions and compile them with library >3.4
"Repeat" function with pin number was used for continuously repeated command for this button: RepeatBtn ( 11 ),
or for repeat after 1 sec. hold button (before ver. 3.4): RepeatBtn ( 5, HOLD )
In the input configuration file each encoder has two lines that configure action for both rotation direction (the prefix 'E' with number of this encoder and "+" or "-" symbol that defines rotation direction and the command (dtaref) for each direction
E2+ sim/cockpit2/...../...../DATAREF_1 0.01-
E2- sim/cockpit2/...../...../DATAREF_1 0.01+
# . . . 'H' mode - Heading change . . . :
# . . . 'A' mode - Altitude change . . . :
# . . . 'V' mode - Vertical speed change . . . :
# . . . 'B' mode - Barometer change . . . :