Page 1 of 1
Using momentary switch to cycle through flight modes
Posted: Fri Feb 16, 2018 7:54 pm
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!
Re: Using momentary switch to cycle through flight modes
Posted: Sat Feb 17, 2018 4:57 am
by Helle
set/reset some log switches with the SH
use then this log switches for aktivating the FP´s
Re: Using momentary switch to cycle through flight modes
Posted: Sat Feb 17, 2018 8:09 am
by Koarl
Can you explain that a bit further please?
Won‘t all the switches be activated at once and stay on simultaneously?
Re: Using momentary switch to cycle through flight modes
Posted: Sat Feb 17, 2018 10:34 am
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
Re: Using momentary switch to cycle through flight modes
Posted: Sat Feb 17, 2018 10:51 am
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
Re: Using momentary switch to cycle through flight modes
Posted: Sat Feb 17, 2018 4:53 pm
by Koarl
Thanks guys!
I‘ll try this asap and hit you back!
Re: Using momentary switch to cycle through flight modes
Posted: Mon Feb 19, 2018 1:05 pm
by Koarl
Works perfect! Thanks!