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:02] – [input_default] jhaircraft:tmd:inputs [2019/07/20 17:11] – [input_active] jh
Line 686: Line 686:
  
 ===== Flight Controls ===== ===== 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][Input][Controls.Yaw.Input]>
 +                <[tmvector2d][Range][ -1.0 1.0 ]>
 +            >
 +            <[input_default][PitchTrimInput][]
 +                <[string8][Input][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 ==== ==== input_control ====
Line 700: Line 724:
 </code> </code>
  
-===== Digital States =====+===== Other Inputs =====
  
 ==== input_binary ==== ==== input_binary ====
Line 776: Line 800:
 </code> </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][Input][Controls.Button]> 
-                <[string8][Events][ DEV0.Trigger ]> 
-            > 
-            <[input_event][Button_Pressed][] 
-                <[string8][Input][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. 
- 
-<code>            <[input_active][ButtonDepressed][] 
-                <[string8][Input][Controls.Button]> 
-                <[float64][InputValue][1.0]> 
-            > 
-</code> 
  
 ==== input_cyclic ==== ==== input_cyclic ====
Line 865: Line 859:
 </code> </code>
  
-==== input_default ====+==== input_event ====
  
-The input_default is used for all non-discrete (floating point) inputs.+Receives messages and then fires events with the received message value.
  
-Typically these are found for light dimmerstrim inputs, etc. which are typically operated with joystick or with a cockpit dimmer or trim-wheel, etc. but button inputs are also possible with this generic input.+  * ''Input'' is the message name 
 +  * ''InputValue'' filters the messages for a specific valueleave the line of code away to not filter for any values 
 +  * All events in the ''Events'' list are triggered once message is received
  
-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.+The use of the ''input_event'' class is described further in the [[aircraft:tmd:events|TMD Events]] topic.
  
-''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_event][Button_Pressed][] 
- +                <[string8][Input][Controls.Button]> 
-<code>            <[input_default][RudderInput][] +                <[string8][Events][ DEV0.Trigger ]>
-                <[string8][Input][Controls.Yaw.Input]> +
-                <[tmvector2d][Range][ -1.0 1.]>+
             >             >
-            <[input_default][PitchTrimInput][] +            <[input_event][Button_Pressed][] 
-                <[string8][Input][Controls.Trim]> +                <[string8][Input][Controls.Button]> 
-                <[string8][InputEnable][1.0]> +                <[float64][InputValue][1.0]> 
-                <[uint][Positions][801]> +                <[string8][Events][ DEV0.Trigger ]>
-                <[tmvector2d][Range][ -1.0 1.0 ]> +
-                <[float64][Value][0.0]> +
-                <[float64][Speed][0.1]>+
             >             >
 </code> </code>
  
-==== input_scratchpad ====+==== input_active ====
  
-<code>+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][Input][Controls.Button]> 
 +                <[float64][InputValue][1.0]> 
 +            >
 </code> </code>
 +
aircraft/tmd/inputs.txt · Last modified: 2022/07/19 21:02 by jh