User Tools

Site Tools


aircraft:tmd:inputs

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
aircraft:tmd:inputs [2019/07/07 17:06] jhaircraft:tmd:inputs [2022/07/19 21:02] (current) jh
Line 1: Line 1:
 ====== TMD Inputs ====== ====== TMD Inputs ======
- 
-===== Buttons, Switches, Knobs and Levers ===== 
  
 Aircraft in the Aerofly FS 2 simulate interactive cockpits where each button, switch, knob, lever, selector, etc. are individual parts. We're now describing how to set up the most common inputs for your own custom aircraft. Aircraft in the Aerofly FS 2 simulate interactive cockpits where each button, switch, knob, lever, selector, etc. are individual parts. We're now describing how to set up the most common inputs for your own custom aircraft.
  
-=== General principle ===+==== General principle ====
  
 The keyboard, joystick or clickspot activated by the mouse, VR hands or touch inputs generate a message from the [[aircraft:controls|controls.tmd]] (**ControlObjects**) that is send to the [[aircraft:tmd|TMD]]. These messages contain the message name string, a message qualifier like step, toggle, move, event, etc. and a value like 1.0 for example or -1.0. The keyboard, joystick or clickspot activated by the mouse, VR hands or touch inputs generate a message from the [[aircraft:controls|controls.tmd]] (**ControlObjects**) that is send to the [[aircraft:tmd|TMD]]. These messages contain the message name string, a message qualifier like step, toggle, move, event, etc. and a value like 1.0 for example or -1.0.
Line 17: Line 15:
 > It is important to get the combination of control message ''Type'', trigger mode of message (e.g. ''OnStep'', ''OnRotate'') as well as the message qualifier (''step'', ''event'', etc.) correctly. Otherwise you might not see the desired results for all input devices if anything happens at all. > It is important to get the combination of control message ''Type'', trigger mode of message (e.g. ''OnStep'', ''OnRotate'') as well as the message qualifier (''step'', ''event'', etc.) correctly. Otherwise you might not see the desired results for all input devices if anything happens at all.
  
-=== Naming Convention ===+==== Naming Convention ====
  
 **Copy & Paste** **Copy & Paste**
Line 24: Line 22:
 E.g. you don't need to come up with different names for the graphics section than for the physics. Just re-use the same one everywhere. Much easier. E.g. you don't need to come up with different names for the graphics section than for the physics. Just re-use the same one everywhere. Much easier.
  
-E.g. In the GraphicObjects section you can **re-use the same name for the graphic object**, e.g. the hingedbodygraphics LandingLightSwitch can use the AngleID LandingLightSwitch.Output without problem. This speeds things up when you only need to copy paste. Sometimes you have to do more on the graphics side of things, then you could use the name with a "Graphics" at the end, e.g. "LandingLightSwitchGraphics" but you could also copy-paste the Geometry name, e.g. SwLdgLt... though this is not recommended as it is harder to decipher and generally costs more time because it can't be copy pasted to other places.+E.g. In the GraphicObjects section you can **re-use the same name for the graphic object**, e.g. the hingedbodygraphics LandingLightSwitch can use the InputID LandingLightSwitch.Output without problem. This speeds things up when you only need to copy paste. Sometimes you have to do more on the graphics side of things, then you could use the name with a "Graphics" at the end, e.g. "LandingLightSwitchGraphics" but you could also copy-paste the Geometry name, e.g. SwLdgLt... though this is not recommended as it is harder to decipher and generally costs more time because it can't be copy pasted to other places.
  
 **...Knob, ...Switch** **...Knob, ...Switch**
  
 In the [[aircraft:tmd|TMD]] the **name of the input** should contain the type of the input at the end of the name. E.g. LandingLightSwitch, PilotPFDBrightnessKnob, Throttle1Lever, GearLever, PackFlowSelector, etc. In the [[aircraft:tmd|TMD]] the **name of the input** should contain the type of the input at the end of the name. E.g. LandingLightSwitch, PilotPFDBrightnessKnob, Throttle1Lever, GearLever, PackFlowSelector, etc.
- 
-**Controls** 
- 
-In the [[aircraft:controls|controls.tmd]] the name of the clickspots (control_box, control_cylinder, control_sphere) should **not** include the type itself (remove the Switch, Knob, etc.). So for the landing lights it should be LandingLight and not LandingLightSwitch. This is because the clickspot name itself is totally irrelevant and the name ''LandingLightSwitch'' can then be used for the control_input, used to transform the clickspot (animate the movement with the switch or lever). Also the type is defined just one line below, so even if you forget if it is a switch or knob or button you can easily check it. 
- 
-In the [[aircraft:controls|controls.tmd]] the name of the messages doesn't yet follow a convention but this might change in the future. If you find similar controls in other aircraft, especially for the ones that you can assign in the controller settings, re-use the message names of the default aircraft as much as you can. Good names are for example: Controls.Lighting.Landing or Autopilot.Disengage, LeftMCDU.Key. 
  
 **Pilot/Copilot or Left/Right** **Pilot/Copilot or Left/Right**
Line 41: Line 33:
  
 When there are more than two devices or the device is located in the center, accessible to both pilots, or when they are usually named this way you can also use a numbering (e.g. RPM1, RMP2, NAV1, NAV2) or left and right (LeftCDU, CenterCDU, RightCDU). The name should be helpful when you search and replace it. For example you can setup the left CDU keys first and then just copy the entire section and then rename all "LeftCDU" with "RightCDU" on the entire block. When there are more than two devices or the device is located in the center, accessible to both pilots, or when they are usually named this way you can also use a numbering (e.g. RPM1, RMP2, NAV1, NAV2) or left and right (LeftCDU, CenterCDU, RightCDU). The name should be helpful when you search and replace it. For example you can setup the left CDU keys first and then just copy the entire section and then rename all "LeftCDU" with "RightCDU" on the entire block.
 +
 +
 +**Controls**
 +
 +In the [[aircraft:controls|controls.tmd]] the name of the clickspots (control_box, control_cylinder, control_sphere) should **not** include the type itself (remove the Switch, Knob, etc.). So for the landing lights it should be LandingLight and not LandingLightSwitch. This is because the clickspot name itself is totally irrelevant and the name ''LandingLightSwitch'' can then be used for the control_input, used to transform the clickspot (animate the movement with the switch or lever). Also the type is defined just one line below, so even if you forget if it is a switch or knob or button you can easily check it.
 +
 +In the [[aircraft:controls|controls.tmd]] the name of the messages doesn't yet follow a convention but this might change in the future. If you find similar controls in other aircraft, especially for the ones that you can assign in the controller settings, re-use the message names of the default aircraft as much as you can. Good names are for example: Controls.Lighting.Landing or Autopilot.Disengage, LeftMCDU.Key.
  
 **Sound** **Sound**
Line 47: Line 46:
  
 ---- ----
 +
 +===== Buttons, Switches, Knobs and Levers =====
  
 ==== Button ==== ==== Button ====
Line 78: Line 79:
             >             >
             <[input_button][ExampleButton][]             <[input_button][ExampleButton][]
-                <[string8][Input][Controls.Example]>+                <[string8][Message][Controls.Example]>
                 <[float64][InputValue][1.0]>                 <[float64][InputValue][1.0]>
                 <[string8][Events]       [ ButtonSoundIn.Trigger  ]>                 <[string8][Events]       [ ButtonSoundIn.Trigger  ]>
Line 106: Line 107:
                 <[string8][GeometryList][ ExampleButton ]>                 <[string8][GeometryList][ ExampleButton ]>
                 <[tmvector3d][Axis][ 1.0 0.0 0.0 ]>                 <[tmvector3d][Axis][ 1.0 0.0 0.0 ]>
-                <[uint32][AngleID][ExampleButton.Output]> +                <[uint32][InputID][ExampleButton.Output]> 
-                <[float64][Pos0][-0.001]> +                <[float64][Scaling][0.001]>
-                <[float64][Pos1][0.001]>+
             >             >
 </code> </code>
  
-''Pos0'' and ''Pos1'' determine the movement length, how far the button is pressed in. ''Pos0'' represents the value for input a theoretical ''-1.0'' and ''Pos1'' for an input of ''1.0''. The average between these two is the zero position.+''Scaling'' and ''Offset'' determine the movement length, how far the button is pressed in. ''Offset'' represents the zero position and ''Scaling'' defines the displacement.
  
-In the example the button moves by 0.001 meter or 1 mm. To increase the amount of translation change Pos0 and Pos1 to e.g. 0.002 for 2 mm+In the example the button moves by 0.001 meter or 1 mm. To increase the amount of translation change the Scaling parameter to e.g. 0.002 for 2 mm.
- +
-> This may be changed in the future to be less confusing.+
  
 === SoundObjects === === SoundObjects ===
Line 206: Line 204:
             >             >
             <[input_switch][ExamleSwitch][]             <[input_switch][ExamleSwitch][]
-                <[string8][Input][Controls.Examle]>+                <[string8][Message][Controls.Examle]>
                 <[float64][Value][1.0]>                 <[float64][Value][1.0]>
                 <[string8][Events]       [ SwitchSoundOn.Trigger  ]>                 <[string8][Events]       [ SwitchSoundOn.Trigger  ]>
Line 235: Line 233:
                 <[tmvector3d][Axis][ 0.0 -1.0 0.0 ]>                 <[tmvector3d][Axis][ 0.0 -1.0 0.0 ]>
                 <[tmvector3d][Pivot][ 0.0 0.0 0.0 ]>                 <[tmvector3d][Pivot][ 0.0 0.0 0.0 ]>
-                <[string8][AngleID][ExampleSwitch.Output]> +                <[string8][InputID][ExampleSwitch.Output]> 
-                <[float64][AngleMax][0.6]>+                <[float64][Scaling][0.6]>
             >             >
 </code> </code>
Line 276: Line 274:
 The typical chain consists of ''control_cylinder'', ''input_discrete'', ''output_free'', ''hingedbodygraphics'' and ''sound_multi''. The typical chain consists of ''control_cylinder'', ''input_discrete'', ''output_free'', ''hingedbodygraphics'' and ''sound_multi''.
  
-The setup is similar to the toggle switch only with minor differences like the use of ''input_discrete'' and ''output_free'' as well as different values for Scaling/AngleMax and an no ''toggle'' option.+The setup is similar to the toggle switch only with minor differences like the use of ''input_discrete'' and ''output_free'' as well as different values for Scaling and an no ''toggle'' option.
  
 === ControlObjects === === ControlObjects ===
Line 328: Line 326:
             >             >
             <[input_discrete][ExamleSwitch][]             <[input_discrete][ExamleSwitch][]
-                <[string8][Input][Controls.Example]>+                <[string8][Message][Controls.Example]>
                 <[tmvector2d][Range][ 0.0 2.0 ]>                 <[tmvector2d][Range][ 0.0 2.0 ]>
                 <[float64][Value][1.0]>                 <[float64][Value][1.0]>
Line 361: Line 359:
                 <[tmvector3d][Axis][ 0.0 -1.0 0.0 ]>                 <[tmvector3d][Axis][ 0.0 -1.0 0.0 ]>
                 <[tmvector3d][Pivot][ 0.0 0.0 0.0 ]>                 <[tmvector3d][Pivot][ 0.0 0.0 0.0 ]>
-                <[string8][AngleID][ExampleSwitch.Output]> +                <[string8][InputID][ExampleSwitch.Output]> 
-                <[float64][AngleMax][0.3]>+                <[float64][Scaling][0.3]>
             >             >
 </code> </code>
Line 430: Line 428:
             >             >
             <[input_discrete][ExamleSwitch][]             <[input_discrete][ExamleSwitch][]
-                <[string8][Input][Controls.Example]>+                <[string8][Message][Controls.Example]>
                 <[tmvector2d][Range][ 0.0 2.0 ]>                 <[tmvector2d][Range][ 0.0 2.0 ]>
                 <[float64][Value][1.0]>                 <[float64][Value][1.0]>
Line 463: Line 461:
                 <[tmvector3d][Axis][ 0.0 -1.0 0.0 ]>                 <[tmvector3d][Axis][ 0.0 -1.0 0.0 ]>
                 <[tmvector3d][Pivot][ 0.0 0.0 0.0 ]>                 <[tmvector3d][Pivot][ 0.0 0.0 0.0 ]>
-                <[string8][AngleID][ExampleSwitch.Output]> +                <[string8][InputID][ExampleSwitch.Output]> 
-                <[float64][AngleMax][0.3]>+                <[float64][Scaling][0.3]>
             >             >
 </code> </code>
Line 527: Line 525:
             >             >
             <[input_knob][ExampleKnob][]             <[input_knob][ExampleKnob][]
-                <[string8][Input][Controls.Example]>+                <[string8][Message][Controls.Example]>
                 <[float64][InputValue][1.0]>                 <[float64][InputValue][1.0]>
                 <[string8][Events][ KnobSound.Trigger ]>                 <[string8][Events][ KnobSound.Trigger ]>
Line 552: Line 550:
                 <[tmvector3d][Axis][ -1.0 0.0 0.0 ]>                 <[tmvector3d][Axis][ -1.0 0.0 0.0 ]>
                 <[tmvector3d][Pivot][ 0.0 0.0 0.0 ]>                 <[tmvector3d][Pivot][ 0.0 0.0 0.0 ]>
-                <[string8][AngleID][ExampleKnob.Output]> +                <[string8][InputID][ExampleKnob.Output]> 
-                <[float64][AngleMax][0.0872665]>+                <[float64][Message][0.0872665]>
             >             >
 </code> </code>
Line 611: Line 609:
  
 <code>            <[input_lever][ExampleLever][] <code>            <[input_lever][ExampleLever][]
-                <[string8][Input][Controls.Example]>+                <[string8][Message][Controls.Example]>
                 <[string8][InputEnable][1.0]>                 <[string8][InputEnable][1.0]>
                 <[tmvector2d][Range][ 0.0 1.0 ]>                 <[tmvector2d][Range][ 0.0 1.0 ]>
Line 643: Line 641:
                 <[tmvector3d][Axis][ 0.0 -1.0 0.0 ]>                 <[tmvector3d][Axis][ 0.0 -1.0 0.0 ]>
                 <[tmvector3d][Pivot][ 0.0 0.0 0.0 ]>                 <[tmvector3d][Pivot][ 0.0 0.0 0.0 ]>
-                <[string8][AngleID][ExampleLever.Output]> +                <[string8][InputID][ExampleLever.Output]> 
-                <[float64][AngleMax][1.0]>+                <[float64][Scaling][1.0]>
             >             >
 </code> </code>
  
 ---- ----
 +
 +==== Lever2 - Dual Lever ===
 +
 +<code>            <[input_lever2][Throttle1Input][]
 +                <[string8][Message0][Controls.Throttle1]>
 +                <[string8][Message1][Controls.ThrustReverse1]>
 +                <[float64][StepSize0][1.0]>
 +                <[float64][StepSize1][2.2222222]>
 +                <[bool][Input0ClampZero][true]>
 +                <[bool][Input1ClampZero][true]>
 +                <[string8][Range][ -1.0 1.35 ]>
 +                <[string8][Range0][ 0.0 1.0 ]>
 +            >
 +</code>
  
 ==== Rocker Button and Switch ==== ==== Rocker Button and Switch ====
  
 <code>            <[input_button_rocker][RudderTrimKnob][] <code>            <[input_button_rocker][RudderTrimKnob][]
-                <[string8][Input][Controls.RudderTrim]>+                <[string8][Message][Controls.RudderTrim]>
                 <[string8][EventsUp]         [ RockerSoundIn.Trigger  ]>                 <[string8][EventsUp]         [ RockerSoundIn.Trigger  ]>
                 <[string8][EventsDown]       [ RockerSoundIn.Trigger  ]>                 <[string8][EventsDown]       [ RockerSoundIn.Trigger  ]>
Line 662: Line 674:
  
 <code>            <[input_switch_rocker][DirectionalGyroCorrectionSwitch][] <code>            <[input_switch_rocker][DirectionalGyroCorrectionSwitch][]
-                <[string8][Input][Navigation.DirectionalGyroCorrection]>+                <[string8][Message][Navigation.DirectionalGyroCorrection]>
                 <[string8][EventsUp]         [ SwitchSound.Trigger ]>                 <[string8][EventsUp]         [ SwitchSound.Trigger ]>
                 <[string8][EventsDown]       [ SwitchSound.Trigger ]>                 <[string8][EventsDown]       [ SwitchSound.Trigger ]>
Line 669: Line 681:
             >             >
 </code> </code>
 +
 +===== Flight Controls =====
 +
 +==== input_default ====
 +
 +The input_default is used for all non-discrete (floating point) inputs.
 +
 +Typically these are found for light dimmers, trim inputs, etc. which are typically operated with a joystick or with a cockpit dimmer or trim-wheel, etc. but button inputs are also possible with this generic input.
 +
 +The ''Speed'' is how fast the input responds when a button is pressed and held. With a speed of 0.1 it takes 10 seconds to reach the full deflection 1.0.
 +
 +''Positions'' is the number of steps that are available when a button is pressed to increment the value. A single press of the button increases the value of the input_default by ( Range.max - Range.min ) /  ( Positions - 1 ). In the example below that is 0.0025 increment per button press, so rather fine trim adjustments can be made.
 +
 +<code>            <[input_default][RudderInput][]
 +                <[string8][Message][Controls.Yaw.Input]>
 +                <[tmvector2d][Range][ -1.0 1.0 ]>
 +            >
 +            <[input_default][PitchTrimInput][]
 +                <[string8][Message][Controls.Trim]>
 +                <[string8][InputEnable][1.0]>
 +                <[uint][Positions][801]>
 +                <[tmvector2d][Range][ -1.0 1.0 ]>
 +                <[float64][Value][0.0]>
 +                <[float64][Speed][0.1]>
 +            >
 +</code>
 +
 +==== input_control ====
 +
 +The input_control behaves much like the input_default but it allows for multiple input devices at the same time. E.g. you could be holding the yoke with your VR hands, then put them down and use your physical yoke instead. The input_control handles these cases and allows a soft transition between multiple devices or even the operation of multiple devices at the same time.
 +
 +> Usually the input_control is only used for the elevator and aileron.
 +
 +<code>            <[input_control][ElevatorInput][]
 +                <[string8][Message][Controls.Pitch.Input]>
 +                <[tmvector2d][Range][ -1.0 1.0 ]>
 +                <[float64][Value][0.0]>
 +            >
 +</code>
 +
 +===== Other Inputs =====
 +
 +==== input_binary ====
 +
 +The input_binary either outputs 1.0 (true) or 0.0 (false). With messages from the controls it can either be toggled (qualifier ''toggle'') or stepped to on or off (step).
 +
 +Using [[aircraft:tmd:events|Events]] the input_binary can be Set, Reset and Toggled (.Toggle).
 +
 +<code>            <[input_binary][BinaryState][]
 +                <[string8][Message][Controls.State]>
 +            >
 +            <[input_binary][BinaryState][]
 +                <[string8][Message][Controls.State]>
 +                <[string8][InputEnable][1.0]>
 +                <[float64][Value][0.0]>
 +            >
 +</code>
 +
 +==== input_discrete ====
 +
 +There are several types of inputs that are represented by an input_discrete, a switch with more then two positions, a rotary selector or a digital input (e.g. selected display page).
 +
 +  * ''Input'' is the message name
 +  * ''InputEnable'' is used to disable any changes, e.g. when electrical power is not applied it is not possible to manipulate the state.
 +  * ''Value'' is the initial position.
 +  * ''Range'' is the minimum and maximum discrete value that can be reached. Use whole numbers here, e.g. (-1.0 1.0) or (0.0 5.0)
 +  * ''EventsUp'' and ''EventsDown'' are used to trigger the sound of the switch. **Do not use these for logic only for sound**
 +
 +The ''Toggle'' property can be used to set and reset the input with subsequent presses of the same button. One button with the message qualifier ''value'' and a value of 2.0 for example could turn on option 2 with the first press and then turn it back off (reset to 0.0) with a second push of the button. A good example is the A320 EFIS control panel to display airports, waypoints, VORs, NDBs, etc. Only one can be selected at a time and two pushes of the same button reset the display to no info displayed.
 +
 +<code>            <[input_discrete][SeatbeltSignsSwitch][]
 +                <[string8][Message][Controls.SeatbeltSigns]>
 +                <[string8][InputEnable][1.0]>
 +                <[string8][Range][ 0.0 2.0 ]>
 +                <[float64][Value][0.0]>
 +                <[string8][EventsUp]  [ SwitchSound.Trigger ]>
 +                <[string8][EventsDown][ SwitchSound.Trigger ]>
 +            >
 +            <[input_discrete][NDPilotInformation][]
 +                <[string8][Message][NavigationDisplayPilot.Information]>
 +                <[string8][Range][ 0.0 5.0 ]>
 +                <[float64][Value][5.0]>
 +                <[bool][Toggle][true]>
 +            >
 +</code>
 +
 +The input_discrete has an output to the tmd only (''Output'').
 +
 +==== input_discrete_cyclic ====
 +
 +The input_discrete_cyclic works exactly like the ''input_discrete'' but with the addition that is loops back around to the beginning of the range when the value is stepped beyond the range limits. E.g. it cycles through the list of display pages
 +
 +<code>            <[input_discrete_cyclic][ECAMPageManuallyTuned][]
 +                <[string8][Message][ECAM.Page]>
 +                <[string8][InputEnable][ClockOn.Output]>
 +                <[string8][Range][ 0.0 11.0 ]>
 +                <[float64][Value][0.0]>
 +                <[bool][Toggle][true]>
 +            >
 +</code>
 +
 +==== input_discrete_momentary ====
 +
 +Again very similar to the ''input_discrete'' the input_discrete_momentary does pretty much the same with the difference being that the last value in the range cannot stay selected. It returns to the second to last value after a short time when the input is no longer active.
 +
 +> Used for the magneto switch and starter or a hold-to-test switch.
 +
 +<code>            <[input_discrete_momentary][MagnetosSwitch][]
 +                <[string8][Message][Controls.Magnetos]>
 +                <[tmvector2d][Range][ 0.0 4.0 ]>
 +                <[float64][Value][3.0]>
 +                <[string8][EventsUp][ MagnetoSwitchSound.Trigger ]>
 +                <[string8][EventsDown][ MagnetoSwitchSound.Trigger ]>
 +            >
 +</code>
 +
 +
 +==== input_cyclic ====
 +
 +The input_cyclic is an input that loops back around to the beginning when it reaches the end of the ''Range''.
 +
 +  * ''Input'' is the message name
 +  * ''InputEnable'' can be used to disable the input, e.g. if the input is digital and electric power is lost
 +  * ''Range'' is the minimum and maximum value of the input
 +  * ''StepSize'' is the increment when a single step is added, e.g. ''0.0174532'' or 1 degree.
 +  * ''Value'' is the initial position
 +
 +<code>            <[input_cyclic][NAV1Course][]
 +                <[string8][Message][Navigation.SelectedCourse1]>
 +                <[string8][InputEnable][1.0]>
 +                <[tmvector2d][Range][ 0.0 6.283185 ]>
 +                <[uint][StepSize][0.0174532]>
 +                <[uint][Value][1.570796]>
 +            >
 +</code>
 +
 +==== input_pair ====
 +
 +This is the typical frequency input that can be found in all kinds of aircraft. The frequency input has two values at the same time, an active and a standby value. The standby value is adjustable and can be set without having an immediate impact. Then the frequency is transferred (swapped) to the active frequency and the previously active frequency is now the standby frequency.
 +
 +  * ''Input'' is the message name for the standby value
 +  * ''InputSwap'' is the transfer button message
 +  * ''InputEnable'' can disable the input, e.g. when electrical power is not available
 +  * ''Range'' is the minimum and maximum value for both values
 +  * ''Positions'' is the number of increments within the Range. When the step increment is known (e.g. 50 kHz) and the limits of the Range are known (e.g. 108 MHz to 118 MHz) the Positions is just: ( Range.max - Range.min ) / step + 1, e.g. ( 118000000.0 - 108000000.0 ) / 50000.0 + 1 = 200 + 1 = 201.
 +  * ''StepLarge'' is the number of small steps that make a coarse step. E.g. 20 x 50 kHz = 1 MHz or 40 x 25 kHz = 1 MHz
 +  * ''Active'' and ''Standby'' are the initial two values
 +
 +For optional automatic frequency tuning (autotuning):
 +  * ''InputExternal'' is an autotuning input from the ''flight_management'' or ''autotuning'' class.
 +  * ''Manual'' is the initial condition weather or not autotuning is on (1.0 if manual control)
 +
 +<code>            <[input_pair][NAV1Frequency][]
 +                <[string8][Message]    [Navigation.NAV1StandbyFrequency]>
 +                <[string8][MessageSwap][Navigation.NAV1FrequencySwap]>
 +                <[tmvector2d][Range][ 108000000.0 118000000.0 ]>
 +                <[float64][Active]  [116000000.0]>
 +                <[float64][Standby] [114100000.0]>
 +                <[uint][Positions][201]>
 +                <[float64][StepLarge][20.0]>
 +            >
 +            <[input_pair][NAV1Frequency][]
 +                <[string8][Message]      [Navigation.NAV1StandbyFrequency]>
 +                <[string8][MessageSwap]  [Navigation.NAV1FrequencySwap]>
 +                <[string8][InputExternal][AutoTuning.OutputNAV1]>
 +                <[string8][InputEnable]  [1.0]>
 +                <[tmvector2d][Range][ 108000000.0 118000000.0 ]>
 +                <[float64][Active]  [116000000.0]>
 +                <[float64][Standby] [114100000.0]>
 +                <[uint][Positions][201]>
 +                <[float64][StepLarge][20.0]>
 +                <[float64][Manual][0.0]>
 +            >
 +</code>
 +
 +==== input_event ====
 +
 +Receives messages and then fires events with the received message value.
 +
 +  * ''Input'' is the message name
 +  * ''InputValue'' filters the messages for a specific value, leave the line of code away to not filter for any values
 +  * All events in the ''Events'' list are triggered once a message is received
 +
 +The use of the ''input_event'' class is described further in the [[aircraft:tmd:events|TMD Events]] topic.
 +
 +<code>            <[input_event][Button_Pressed][]
 +                <[string8][Message][Controls.Button]>
 +                <[string8][Events][ DEV0.Trigger ]>
 +            >
 +            <[input_event][Button_Pressed][]
 +                <[string8][Message][Controls.Button]>
 +                <[float64][InputValue][1.0]>
 +                <[string8][Events][ DEV0.Trigger ]>
 +            >
 +</code>
 +
 +==== input_active ====
 +
 +Outputs 1.0 to the tmd as long as a lever is grabbed or a button is depressed.
 +
 +> Typically this is only used to make a light illuminate as long as a button is pressed or to give visual feedback that a control is grabbed. Don't use this for every single button in combination with an event_edge, this should be done with the ''input_event'' class instead.
 +
 +<code>            <[input_active][ButtonDepressed][]
 +                <[string8][Message][Controls.Button]>
 +                <[float64][InputValue][1.0]>
 +            >
 +</code>
 +
aircraft/tmd/inputs.1562511988.txt.gz · Last modified: 2019/07/07 17:06 by jh