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
Next revisionBoth sides next revision
aircraft:tmd:inputs [2019/07/20 17:07] jhaircraft:tmd:inputs [2022/07/19 20:59] jh
Line 79: 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 207: Line 207:
             >             >
             <[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 236: Line 236:
                 <[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 277: Line 277:
 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 329: Line 329:
             >             >
             <[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 362: Line 362:
                 <[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 431: Line 431:
             >             >
             <[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 464: Line 464:
                 <[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 528: Line 528:
             >             >
             <[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 553: Line 553:
                 <[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 612: Line 612:
  
 <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 644: Line 644:
                 <[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>
Line 654: Line 654:
  
 <code>            <[input_lever2][Throttle1Input][] <code>            <[input_lever2][Throttle1Input][]
-                <[string8][Input0][Controls.Throttle1]> +                <[string8][Message0][Controls.Throttle1]> 
-                <[string8][Input1][Controls.ThrustReverse1]>+                <[string8][Message1][Controls.ThrustReverse1]>
                 <[float64][StepSize0][1.0]>                 <[float64][StepSize0][1.0]>
                 <[float64][StepSize1][2.2222222]>                 <[float64][StepSize1][2.2222222]>
Line 668: Line 668:
  
 <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 677: Line 677:
  
 <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 698: Line 698:
  
 <code>            <[input_default][RudderInput][] <code>            <[input_default][RudderInput][]
-                <[string8][Input][Controls.Yaw.Input]>+                <[string8][Message][Controls.Yaw.Input]>
                 <[tmvector2d][Range][ -1.0 1.0 ]>                 <[tmvector2d][Range][ -1.0 1.0 ]>
             >             >
             <[input_default][PitchTrimInput][]             <[input_default][PitchTrimInput][]
-                <[string8][Input][Controls.Trim]>+                <[string8][Message][Controls.Trim]>
                 <[string8][InputEnable][1.0]>                 <[string8][InputEnable][1.0]>
                 <[uint][Positions][801]>                 <[uint][Positions][801]>
Line 718: Line 718:
  
 <code>            <[input_control][ElevatorInput][] <code>            <[input_control][ElevatorInput][]
-                <[string8][Input][Controls.Pitch.Input]>+                <[string8][Message][Controls.Pitch.Input]>
                 <[tmvector2d][Range][ -1.0 1.0 ]>                 <[tmvector2d][Range][ -1.0 1.0 ]>
                 <[float64][Value][0.0]>                 <[float64][Value][0.0]>
Line 724: Line 724:
 </code> </code>
  
-===== Digital States =====+===== Other Inputs =====
  
 ==== input_binary ==== ==== input_binary ====
Line 733: Line 733:
  
 <code>            <[input_binary][BinaryState][] <code>            <[input_binary][BinaryState][]
-                <[string8][Input][Controls.State]>+                <[string8][Message][Controls.State]>
             >             >
             <[input_binary][BinaryState][]             <[input_binary][BinaryState][]
-                <[string8][Input][Controls.State]>+                <[string8][Message][Controls.State]>
                 <[string8][InputEnable][1.0]>                 <[string8][InputEnable][1.0]>
                 <[float64][Value][0.0]>                 <[float64][Value][0.0]>
Line 755: Line 755:
  
 <code>            <[input_discrete][SeatbeltSignsSwitch][] <code>            <[input_discrete][SeatbeltSignsSwitch][]
-                <[string8][Input][Controls.SeatbeltSigns]>+                <[string8][Message][Controls.SeatbeltSigns]>
                 <[string8][InputEnable][1.0]>                 <[string8][InputEnable][1.0]>
                 <[string8][Range][ 0.0 2.0 ]>                 <[string8][Range][ 0.0 2.0 ]>
Line 763: Line 763:
             >             >
             <[input_discrete][NDPilotInformation][]             <[input_discrete][NDPilotInformation][]
-                <[string8][Input][NavigationDisplayPilot.Information]>+                <[string8][Message][NavigationDisplayPilot.Information]>
                 <[string8][Range][ 0.0 5.0 ]>                 <[string8][Range][ 0.0 5.0 ]>
                 <[float64][Value][5.0]>                 <[float64][Value][5.0]>
Line 772: Line 772:
 The input_discrete has an output to the tmd only (''Output''). The input_discrete has an output to the tmd only (''Output'').
  
-==== input_event ====+==== input_discrete_cyclic ====
  
-Receives messages and then fires events with the received message value.+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 limitsE.g. it cycles through the list of display pages
  
-  * ''Input'' is the message name +<code>            <[input_discrete_cyclic][ECAMPageManuallyTuned][] 
-  * ''InputValue'' filters the messages for a specific value, leave the line of code away to not filter for any values +                <[string8][Message][ECAM.Page]> 
-  * All events in the ''Events'' list are triggered once a message is received +                <[string8][InputEnable][ClockOn.Output]> 
- +                <[string8][Range][ 0.0 11.0 ]> 
-The use of the ''input_event'' class is described further in the [[aircraft:tmd:events|TMD Events]] topic. +                <[float64][Value][0.0]> 
- +                <[bool][Toggle][true]>
-<code>            <[input_event][Button_Pressed][] +
-                <[string8][Input][Controls.Button]> +
-                <[string8][Events][ DEV0.Trigger ]> +
-            > +
-            <[input_event][Button_Pressed][] +
-                <[string8][Input][Controls.Button]> +
-                <[float64][InputValue][1.0]> +
-                <[string8][Events][ DEV0.Trigger ]>+
             >             >
 </code> </code>
  
-==== input_active ====+==== input_discrete_momentary ====
  
-Outputs 1.to the tmd as long as lever is grabbed or a button is depressed.+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 selectedIt returns to the second to last value after short time when the input is no longer active. 
 + 
 +> Used for the magneto switch and starter or a hold-to-test switch.
  
-<code>            <[input_active][ButtonDepressed][] +<code>            <[input_discrete_momentary][MagnetosSwitch][] 
-                <[string8][Input][Controls.Button]> +                <[string8][Message][Controls.Magnetos]> 
-                <[float64][InputValue][1.0]>+                <[tmvector2d][Range][ 0.0 4.0 ]> 
 +                <[float64][Value][3.0]> 
 +                <[string8][EventsUp][ MagnetoSwitchSound.Trigger ]> 
 +                <[string8][EventsDown][ MagnetoSwitchSound.Trigger ]>
             >             >
 </code> </code>
  
- 
-===== Other Inputs ===== 
  
 ==== input_cyclic ==== ==== input_cyclic ====
Line 817: Line 812:
  
 <code>            <[input_cyclic][NAV1Course][] <code>            <[input_cyclic][NAV1Course][]
-                <[string8][Input][Navigation.SelectedCourse1]>+                <[string8][Message][Navigation.SelectedCourse1]>
                 <[string8][InputEnable][1.0]>                 <[string8][InputEnable][1.0]>
                 <[tmvector2d][Range][ 0.0 6.283185 ]>                 <[tmvector2d][Range][ 0.0 6.283185 ]>
Line 842: Line 837:
  
 <code>            <[input_pair][NAV1Frequency][] <code>            <[input_pair][NAV1Frequency][]
-                <[string8][Input]    [Navigation.NAV1StandbyFrequency]> +                <[string8][Message]    [Navigation.NAV1StandbyFrequency]> 
-                <[string8][InputSwap][Navigation.NAV1FrequencySwap]>+                <[string8][MessageSwap][Navigation.NAV1FrequencySwap]>
                 <[tmvector2d][Range][ 108000000.0 118000000.0 ]>                 <[tmvector2d][Range][ 108000000.0 118000000.0 ]>
                 <[float64][Active]  [116000000.0]>                 <[float64][Active]  [116000000.0]>
Line 851: Line 846:
             >             >
             <[input_pair][NAV1Frequency][]             <[input_pair][NAV1Frequency][]
-                <[string8][Input       [Navigation.NAV1StandbyFrequency]> +                <[string8][Message     [Navigation.NAV1StandbyFrequency]> 
-                <[string8][InputSwap   [Navigation.NAV1FrequencySwap]>+                <[string8][MessageSwap [Navigation.NAV1FrequencySwap]>
                 <[string8][InputExternal][AutoTuning.OutputNAV1]>                 <[string8][InputExternal][AutoTuning.OutputNAV1]>
                 <[string8][InputEnable]  [1.0]>                 <[string8][InputEnable]  [1.0]>
Line 864: Line 859:
 </code> </code>
  
-==== input_discrete_cyclic ====+==== input_event ====
  
-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 limitsE.g. it cycles through the list of display pages+Receives messages and then fires events with the received message value.
  
-<code>            <[input_discrete_cyclic][ECAMPageManuallyTuned][] +  * ''Input'' is the message name 
-                <[string8][Input][ECAM.Page]> +  * ''InputValue'' filters the messages for a specific value, leave the line of code away to not filter for any values 
-                <[string8][InputEnable][ClockOn.Output]> +  * All events in the ''Events'' list are triggered once a message is received 
-                <[string8][Range][ 0.0 11.0 ]> + 
-                <[float64][Value][0.0]> +The use of the ''input_event'' class is described further in the [[aircraft:tmd:events|TMD Events]] topic. 
-                <[bool][Toggle][true]>+ 
 +<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> </code>
  
-==== input_discrete_momentary ====+==== input_active ====
  
-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 selectedIt returns to the second to last value after short time when the input is no longer active.+Outputs 1.to the tmd as long as lever is grabbed or a button is depressed.
  
-Used for the magneto switch and starter or hold-to-test switch.+Typically this is only used to make 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_discrete_momentary][MagnetosSwitch][] +<code>            <[input_active][ButtonDepressed][] 
-                <[string8][Input][Controls.Magnetos]> +                <[string8][Message][Controls.Button]> 
-                <[tmvector2d][Range][ 0.0 4.0 ]> +                <[float64][InputValue][1.0]>
-                <[float64][Value][3.0]> +
-                <[string8][EventsUp][ MagnetoSwitchSound.Trigger ]> +
-                <[string8][EventsDown][ MagnetoSwitchSound.Trigger ]>+
             >             >
 </code> </code>
- 
  
aircraft/tmd/inputs.txt · Last modified: 2022/07/19 21:02 by jh