Using momentary switch to cycle through flight modes

Post Reply
Koarl
Posts: 203
Joined: Sun Jul 01, 2012 5:08 pm
Country: -

Using momentary switch to cycle through flight modes

Post by Koarl »

Hello!

Could someone help me please to get this running?
I wanna setup the momentary switch to cycle through flight modes. So if I flip SH once, FP1 is activated, flip SH again FP2 and flipping again returns to FP0.

Any idea?

Thanks!

Helle
Posts: 577
Joined: Sat Jul 21, 2012 7:08 am
Country: -

Re: Using momentary switch to cycle through flight modes

Post by Helle »

set/reset some log switches with the SH
use then this log switches for aktivating the FP´s
Koarl
Posts: 203
Joined: Sun Jul 01, 2012 5:08 pm
Country: -

Re: Using momentary switch to cycle through flight modes

Post by Koarl »

Can you explain that a bit further please?
Won‘t all the switches be activated at once and stay on simultaneously?
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Using momentary switch to cycle through flight modes

Post by jhsa »

You could also increase a GVAR, and then reset it back to zero when it reaches a certain value. Detect the values with logical switches and assign them to control the flight modes.
Also to force the GVAR to zero use a logical switch.

João

Sent from my BLN-L21 using Tapatalk

My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Using momentary switch to cycle through flight modes

Post by MikeB »

I just tried something in Companion, a couple of logical switches:
L01: a<x GV1 3 AND(SHv) Duration(0.1)
L01: a=x GV1 3 AND(SHv) Duration(0.1)

Then a couple of special functions:
SF1: L01 AdjustGV1 Increment 1
SF2: L02 AdjustGV1 Value 0

These cause GV1 to step through 0, 1 and 2 each time SH is toggled. It probably skips to 3 very briefly, but I can't see a way of using the edge of SH to perform the functions.

Then just use GV1 in some further logical switches to select the required flight mode.

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

Koarl
Posts: 203
Joined: Sun Jul 01, 2012 5:08 pm
Country: -

Re: Using momentary switch to cycle through flight modes

Post by Koarl »

Thanks guys!
I‘ll try this asap and hit you back!
Koarl
Posts: 203
Joined: Sun Jul 01, 2012 5:08 pm
Country: -

Re: Using momentary switch to cycle through flight modes

Post by Koarl »

Works perfect! Thanks!

Post Reply

Return to “openTx model setup”