add delay to physical switch before it 'activates'

openTx has introduced a range of new features, ideas and bling. It is fast becoming the firmware of choice for many users. openTx will run on ALL current hardware platforms, including the gruvin9x and sky9x boards. Work has already started to support the new FrSky X9D radio!
Post Reply
csurf
Posts: 107
Joined: Sat Aug 17, 2013 9:13 am
Country: -

add delay to physical switch before it 'activates'

Post by csurf »

I need help figuring out how to setup the following...

I just installed a 6-position switch in my taranis for controlling APM/pixhawk flight modes.
What I'd like to do is setup the 6-pos switch so that there's a 1-2 second delay before the final channel value is sent to the output mix. So, I want to be able to quickly 'scroll' through the six different switch positions (with audible mode confirmation... "MANUAL/RTH/FLY-BY-WIRE/CRUISE/etc.") without actually changing the output value until I leave the switch in its final position and let the timer expire. The purpose of this is to avoid quickly switching between intermediate flight modes until I've made my final selection.

real-world example:
- 6pos switch is in position '1' (let's say 'MANUAL'), and I have channel 8 setup to output the final switch value to the flight controller
- I want to scroll over to position '5' (let's say 'LOITER') without engaging all of the intermediate switch positions / APM flight modes.
- as I scroll from switch positions '1' to '5', I want to hear audible confirmation of each mode (ex: radio plays custom audio files for each mode as I go from position 2 to 5 "ACRO...STABILIZE...CRUISE...LOITER...").
- I leave the 6pos switch in position 5 (LOITER) and wait for the timer to expire
- after the timeout expires (~1-2sec), the 'position 5' switch value gets sent to the output mix (on channel 8), and I get audible confirmation of the switch output being activated (ex: radio plays a custom "ENGAGED/ACTIVATED" audio file)

Can someone please help me figure out how to set this up in opentx?

csurf
Posts: 107
Joined: Sat Aug 17, 2013 9:13 am
Country: -

Re: add delay to physical switch before it 'activates'

Post by csurf »

bump... can anyone help me out with this?
User avatar
Kilrah
Posts: 11109
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: add delay to physical switch before it 'activates'

Post by Kilrah »

A "delay" on the actual output mix line should be all that's needed.
mholmes
Posts: 1
Joined: Sat Dec 05, 2020 2:13 am
Country: -

Re: add delay to physical switch before it 'activates'

Post by mholmes »

I'm bringing this thread back to life because an aspect of the question remains unanswered, but the title is right on.

I have implemented six different arducopter modes using two switches.
I have added a delay to the logical switches before the mode goes active.
The problem remains; in fact it's worse. As soon as the switch is moved, the signal sent goes immediately to a value of 1500; only after the delay does the value update to the proper, desired value. In this sense, reducing the delay reduces the amount of time that we spend sitting with a value of 1500 (which happens to be RTL for me, but I don't want it to try to start RTL between every mode change).

How do I remedy this intermediate value that the Taranis X9D+ is sending? Clearly, I want it to maintain the previous value before switching over to the new value, rather than jumping to a spurious intermediate value. Much thanks!

Post Reply

Return to “openTx”