aircraft:tmd:events
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
aircraft:tmd:events [2019/07/20 15:37] – [Event Value Checks] jh | aircraft:tmd:events [2019/07/20 16:04] – [event_swap] jh | ||
---|---|---|---|
Line 91: | Line 91: | ||
==== event_linear ==== | ==== event_linear ==== | ||
+ | |||
+ | The event_linear changes the value carried by the event and then triggers a list of '' | ||
+ | The new value is simply: '' | ||
< | < | ||
Line 100: | Line 103: | ||
==== event_value ==== | ==== event_value ==== | ||
+ | |||
+ | The event_value overwrites the value carried by the event chain and uses the value from the '' | ||
+ | |||
+ | This is used to set a '' | ||
< | < | ||
Line 122: | Line 129: | ||
==== event_demultiplexer ==== | ==== event_demultiplexer ==== | ||
+ | |||
+ | This is like a switch case with discrete input taken from the tmd. | ||
+ | |||
+ | The '' | ||
+ | |||
+ | > If InputSelect == 0.0 -> trigger event at index 0 (first in the list), if InputSelect == 1.0 -> trigger event at index 1 (triggers second in the list), etc. | ||
< | < | ||
Line 131: | Line 144: | ||
==== event_select ==== | ==== event_select ==== | ||
- | When triggered the event_select checks the value of the event call and casts it into an integer. Depending on the integer it selects one of the events from the '' | + | This is like a switch case with discrete input taken from the value of the event itself. |
+ | |||
+ | When triggered the event_select checks the value of the event call and casts it into an integer. Depending on the integer it selects one of the events from the '' | ||
This is useful to have when there is a row of buttons, e.g. like a bezel select on an multifunction display and there is only one message name to be used. With an input_event you can receive that message and then call this event_select to do something specific based on the value of the original button message. | This is useful to have when there is a row of buttons, e.g. like a bezel select on an multifunction display and there is only one message name to be used. With an input_event you can receive that message and then call this event_select to do something specific based on the value of the original button message. | ||
Line 148: | Line 163: | ||
==== event_range ==== | ==== event_range ==== | ||
- | When the event range is triggered it checks the value of the event call against the range and triggers either the list of events when inside or outside of the range. E.g. a button could generate a message with value 1.0 which is received by an input_event and then the input_event triggers this event_range. Depending on what the button value was the event_range does one thing within a set range but does something different when the value is outside that range. | + | When the event_range |
< | < | ||
Line 159: | Line 174: | ||
===== Event Functions ===== | ===== Event Functions ===== | ||
+ | |||
+ | The following objects allow for different outcomes of a triggered event. | ||
+ | After the execution of a chain of events usually either nothing happens, one or more value are changed or a pulse or timer is triggerd. | ||
==== DEV0 ==== | ==== DEV0 ==== | ||
Line 176: | Line 194: | ||
* Variable.Step - The value is increased or decreased by the value carried by the event (Value += event_value) | * Variable.Step - The value is increased or decreased by the value carried by the event (Value += event_value) | ||
* Variable.Reset - The value is set to 0.0 (Value = 0.0) | * Variable.Reset - The value is set to 0.0 (Value = 0.0) | ||
+ | |||
+ | > Events are not limited to the variable class. Many, in fact almost all of the [[aircraft: | ||
< | < | ||
Line 204: | Line 224: | ||
==== event_timeout ==== | ==== event_timeout ==== | ||
+ | The timeout is an object like a countdown, several things can be fired here: '' | ||
+ | to start/ | ||
+ | |||
+ | '' | ||
+ | |||
+ | When the timer has reached zero the list of '' | ||
+ | |||
+ | > The event delay could theoretically restart itself causing a periodic check, but this should be avoided if possible as there are better ways to catch changes in a system state, e.g. the '' | ||
+ | |||
< | < | ||
- | < | + | < |
< | < | ||
> | > | ||
Line 211: | Line 240: | ||
==== event_repeat ==== | ==== event_repeat ==== | ||
+ | |||
+ | Constantly fires an event as long as the input condition is non-zero. When the input is above zero the '' | ||
+ | |||
+ | '' | ||
+ | |||
+ | > It is not intended to trigger a long chain of events, just to fluidly move an input back and forth like the directional gyro adjustment for example. | ||
< | < | ||
Line 222: | Line 257: | ||
==== event_swap ==== | ==== event_swap ==== | ||
+ | |||
+ | This can swap two values within the tmd, e.g. two variables or a variable and an '' | ||
+ | |||
+ | > The '' | ||
< | < |
aircraft/tmd/events.txt · Last modified: 2022/07/19 21:07 by jh