Play my value

Mike Shellim 18 April 2016
Update 10 June 2022

For trims

This snippet will announce the value of a trim every time it's released. The example uses the elevator trim.

Logical Switches
L1 Edge(!EleTrim Up, [0:instant])
L2 Edge(!EleTrim Down, [0:instant])
L3 TrmE = 0
L4 ( L01 OR L02 ) AND !L03

 

Special Functions
SF1 L04 - Play Value (TrmE)

L1 is true briefly, when the ele trim is released from the up position.
L2 is true briefly, when the ele trim is released from the down position.
L3 is true when the trim is in the centre.
L4 is true when either L1 or L2 is true and L3 is false... in other words when the trim lever is released, and it is not in the centre (We don't want the value to be called out over the 'trim centre' announcement.)

SF1 announces the elevator trim value when L4 is true.

For analogue controls

The above won't work for controls like sticks and sliders as there's no concept of 'releasing' such a control. But we can achieve something similar by detecting when the control is no longer moved.

The code consists of one logical switch and one special function: L1 detects a change in value; SF1 plays the value.

L1