Read and Reset Timer Switch
I have set my momentary (SH) switch to read out to me the remaining time on the flight timer. However, using logical switches, we can give SH a dual mode. A quick press and release to read the remaining time, or hold it for 3 seconds to reset the timer. It has the added bonus of not reading out all the values when we reset the timer. We can even add a parameter so that the timer will not reset unless the throttle cut switch is enabled.
Step 1 – Create the Logical Switches
Our first task is to create a couple of Logical Switches to determine what action we are performing with the momentary switch. We want it so that if we switch and release SH within 0.5s it reads the timer, but if we hold for 3s or more it resets the timer. To do this, we create 2 Logical Switches using the Edge function.
L01 is the logical switch for the value reading. V1 specifies the switch and position. V2 specifies the minimum and maximum time that the switch is held for. Therefore, L01 will only activate when SH is held in the ↓ position for between 0.0 and 0.5 seconds.
L02 is the logical switch for resetting the timer. The settings are very similar to L01 but I have also added an AND Switch parameter of SF↓ (I use SF for throttle cut); which means the timer will only reset if SH is held in the ↓ position for 3 seconds or more and when SF is also ↓. This is completely optional, if you want to be able to reset the timer regardless of throttle state, leave AND Switch set to —.
Step 2 – Create the Special Functions
Next we need to make some Special Functions to act when the logical switches trigger. In this example, the switches are acting on Timer 1, but this could be any timer, or all timers by creating a Special Function for each timer.
SF1 will activate when L01 triggers and will play the value in Timer 1. You could have other values read out too, for example VFAS. All you would need to do is create another Special Function and change the value read. The Taranis will read all the values in sequence.
SF2 will activate when L02 triggers and will reset Timer 1 to 00:00:00.
That’s all there is to it, a dual function useful switch.
Full OpenTX Code
|L01||EDGE||SH↓||0.0 | 0.5||---||---||---|
|L02||EDGE||SH↓||3.0 | 3.0(infinite)||---||---||---|
|SF01||L01||Play Value||Timer1||No repeat|
This article has helped 56 people. For more useful things, please check out my YouTube Channel.