Play my value

Mike Shellim 18 April 2016
Update 19 Sept 2020

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 pulses true when the ele trim is released from the up position. L2 is the same, for down. L3 is true when the trim is in the centre.

L4 is true when either L1 or L2 are true, AND L3 is true... in other words when the trim lever is released, but 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.