Trainer switch to toggle a cyclic mix?

er9x is the best known firmware. It has a superb range of features and is well supported by the community. Well worth trying out.
Reacher10
Posts: 379
Joined: Tue Dec 27, 2011 7:46 pm
Country: -

Trainer switch to toggle a cyclic mix?

Post by Reacher10 »

 ! Message from: Kilrah
Thread moved.
I could use some help with this one and couldn't quite figure it out. I'm sure it can be done...I think?

I'm looking for a mix that will cycle thru the flaps. Hit the TRN (MOM) switch and get one notch of flaps, hit it again and get flaps full down, hit it one more time and flaps go up.

As well I would like it on the 3 POS switch that will over ride where ever they were set at with the MOM switch.

On my radio I have a momentary button in parallel with the TRN switch and I can hit with my index finger. The trainer switch is is replaced with a ON/OFF toggle switch. So when the TRN switch is forward/ON, the MOM button can toggle the TRN switch.

So with this I'd like to toggle the flaps with my finger and cycle thru them and if the were set last by the TRN switch, the 3 POS switch will over ride that setting.

Of course if the TRN switch is off/BACK then the MOM button does nothing.

I'm Running ERSKY with the SKY9 board by Brent so it has a little more to work with as far as mixing goes. For each setting the audio would report "flaps down trainer switch" or "Flaps 1 ID1" and so on for how they are being set.

Any Ideas?

Thanks
Rick

User avatar
Kilrah
Posts: 11109
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: Trainer switch to toggle a cyclic mix?

Post by Kilrah »

Reacher10
Posts: 379
Joined: Tue Dec 27, 2011 7:46 pm
Country: -

Re: Trainer switch to toggle a cyclic mix?

Post by Reacher10 »

Thanks Kilrah but umm...what...couldn't figure out anything from that discussion.
User avatar
Kilrah
Posts: 11109
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: Trainer switch to toggle a cyclic mix?

Post by Kilrah »

Note that the linked thread refers to openTx. I don't think an equivalent is possible in er9x/ersky9x.
User avatar
MikeB
9x Developer
Posts: 18000
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Trainer switch to toggle a cyclic mix?

Post by MikeB »

Here's a starting point for you (for er9x):
Switches
CSW1: v<ofs CH14 -50 (AND) SW7
CSW2: |v|<ofs CH14 5 (AND) SW7
CSW3: v>ofs CH14 50 (AND) SW7
CSW7 AND TRN TRN
You have to use switch 7 as TRN is not avaliable in the ANDSW field (it is on ersky9x)
Mixes
CH14 +100% CH14
CH14: R +100% CH15 Switch(!TRN)
CH15: R +100% FULL Switch(SW2)
CH15: R -100% FULL Switch(SW3)
CH15: R +0% FULL Switch(SW1)
CH15: R +100% CH15 Switch(!TRN)

This will give you channel 15 stepping between -100%, 0% and +100% each time yoy turn the TRN switch on.

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

User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Trainer switch to toggle a cyclic mix?

Post by jhsa »

now, is it possible to hard code that and call it "toggle function" ? :D ;)
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: 18000
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Trainer switch to toggle a cyclic mix?

Post by MikeB »

It might, but it is not very general purpose.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
Reacher10
Posts: 379
Joined: Tue Dec 27, 2011 7:46 pm
Country: -

Re: Trainer switch to toggle a cyclic mix?

Post by Reacher10 »

Thanks Mike...that is what I was looking for to get started...thanks!
Reacher10
Posts: 379
Joined: Tue Dec 27, 2011 7:46 pm
Country: -

Re: Trainer switch to toggle a cyclic mix?

Post by Reacher10 »

Mike as you know I am testing the AR9 board. I've added two momentary switches and am using this cyclic switch. As Joao mentioned above about making this a selectable feature I do think it would be a nice feature. Because we are limited on where we can mount switches and how very functional momentary buttons on the back of the radio are with this mix.

I could see the function being 2 pos and 3 pos or just chose how many position you want. There could be a bit of an issue if you need to go back to pos 1 from pos 2 if it is set up for say a 3 or 4 pos switch in whitch case another switch, like another momentaryswitch can be set to "escape" back to pos 1.
User avatar
MikeB
9x Developer
Posts: 18000
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Trainer switch to toggle a cyclic mix?

Post by MikeB »

On ersky9x, I think you can use GVARS. It now has "Gvar Adjusters", worth investigating.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
Reacher10
Posts: 379
Joined: Tue Dec 27, 2011 7:46 pm
Country: -

Re: Trainer switch to toggle a cyclic mix?

Post by Reacher10 »

I'll have a look....I have to confess I never did get my head wrapped around gvars :? ..thanks
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Trainer switch to toggle a cyclic mix?

Post by jhsa »

I think not long ago we discussed something similar using the adjusters and there were some examples. But I can't remember where :(

João
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: 18000
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Trainer switch to toggle a cyclic mix?

Post by MikeB »

erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Trainer switch to toggle a cyclic mix?

Post by jhsa »

Thanks Mike.. How do you always find the stuff?? Maybe I use the wrong words in the search :)

João
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
Reacher10
Posts: 379
Joined: Tue Dec 27, 2011 7:46 pm
Country: -

Re: Trainer switch to toggle a cyclic mix?

Post by Reacher10 »

Mike is the king of all time, space and dimension. Us mere mortals will never know.
User avatar
MikeB
9x Developer
Posts: 18000
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Trainer switch to toggle a cyclic mix?

Post by MikeB »

I just searched for "Adjusters"!

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Trainer switch to toggle a cyclic mix?

Post by jhsa »

Reacher10 wrote:Mike as you know I am testing the AR9 board. I've added two momentary switches and am using this cyclic switch.
Ok I have just been playing with a couple of ideas, and ended up putting them together and make just a big idea :mrgreen:
Picked up pieces from 2 examples and joined them.. Give it a try on the radio as eepskye has a little bug and PB1 doesn't seem to work as an AND switch at the moment..
I will assume that both momentary switches you've added are "PB1" and "PB2". If not, just change accordingly ;)
So, what does the following example do?
It will increase values (steps of 40) by pressing PB1 short and decrease values by pressing PB2 short. Values are -100, -60, -20, 20, 60, 100.
If you press PB1 Long, it will reset to -100 (we could also easily reset to +100 by pressing PB2 long, but not on this example).

First we will detect a long and a short press of PB1

Logical switches:

L1 1-shot PB1 0.8 AND !PB1
L2 Ntimer 0.6 100 AND PB1

L1 pulses on if PB1 is pressed short.
L2 pulses on of PB1 is pressed long.

Now we program the increase/decrease/reset features using GVAR Adjusters:

A1 GV1 +/Lim L1 61
A2 GV1 add L1 39
A3 GV1 -/Lim PB2 -61
A4 GV1 add PB2 -39
A5 Set C L2 -100


Use GV1 as source for a mix.

João

EDITED WITH THE NEW EXAMPLE FROM MIKE'S POST BELOW. Now it seems to work fine..
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: 18000
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Trainer switch to toggle a cyclic mix?

Post by MikeB »

Here's a possible alternative way to detect a long press.

L4 Ntimer 1 100 AND PB1
It is a slight fiddle. While PB1 is OFF, L4 is OFF.
When you press PB1, the Ntimer of L4 starts, and spends 1 second OFF, then turns ON for 100 seconds. If you release PB1 before the 1 second, then L4 is held OFF. The only 'problem' with this method is if your long press is more than 101 seconds!!!

So this gives you a long press detection using a single logical switch, and doesn't glitch. Just set the first parameter (currently 1) to the duration of the long press you require, you can use a resolution of tenths of a second, go DOWN from 1 to get 0.1, 0.2 etc.

For the short press detection, try:
L1 1-shot PB1 1 AND !PB1
this seems to work OK on eepskye.

I haven't tried either on the radio.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Trainer switch to toggle a cyclic mix?

Post by jhsa »

Mike, this seems to be working really well on the radio. And so simple and obvious.. I was so focused on the other example that didn't think about other possibilities.Just wanted to make that work :(

Thanks, will update my post above..

João
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
Reacher10
Posts: 379
Joined: Tue Dec 27, 2011 7:46 pm
Country: -

Re: Trainer switch to toggle a cyclic mix?

Post by Reacher10 »

I am using PB1 & 2.

I set everything as you have it however I'm confused about this particular number in bold.

A1 GV1 +/Lim 81 L2 81
A2 GV1 add L2 39
A3 GV1 -/Lim PB2 -81
A4 GV1 add PB2 -39
A5 Set C L4 -100

Is that 81 what I set GVAR1 to? I did set it to 81 and also 100. It increases and decreases by increments of 40 depending on which switch I hit. long press of PB1 sets it to either -120 or -100 but not consistently.

I set the source on channel 5 as GVAR1 and it will move in increments but only momentarily.
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Trainer switch to toggle a cyclic mix?

Post by jhsa »

Reacher10, there were some problems with the long and short press detection.. Also 81 and -81 should be 61 and -61, sorry..
Please see my post above again as I corrected the mistakes, I hope ;)

João
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
Reacher10
Posts: 379
Joined: Tue Dec 27, 2011 7:46 pm
Country: -

Re: Trainer switch to toggle a cyclic mix?

Post by Reacher10 »

Just saw your posts....gotta lot going on here...GF is packing for her vacation, it's pouring out, shes in a bad mood, I'm writing a cover letter for a job, friend is helping me with it, baseball playoffs are on, hockey season opening night, NASCAR race is on, I need a beer....MAKE IT STOP!!!!

I'll have to take a better look in the morning
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Trainer switch to toggle a cyclic mix?

Post by jhsa »

;) :)
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
Reacher10
Posts: 379
Joined: Tue Dec 27, 2011 7:46 pm
Country: -

Re: Trainer switch to toggle a cyclic mix?

Post by Reacher10 »

I have TimeOff and NTimeOff but no Ntimer

L1 1-shot PB1 0.8 AND !PB1
L2 Ntimer 0.6 100 AND PB1

Also on the on the adjusters I only have 4 fields, not 5 as the first line shows with not having the option for "81" specifically.

A1 GV1 +/Lim 81 L1 61
A2 GV1 add L1 39
A3 GV1 -/Lim PB2 -61
A4 GV1 add PB2 -39
A5 Set C L2 -100
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Trainer switch to toggle a cyclic mix?

Post by jhsa »

Please ignore that 81 on the first line. It was left there by mistake. Already corrected.

Of course you have Ntimer. A timer has OFF and ON fields. As the screen doesn't have enough space the words are together NtimeOFF. Confusing I know :(

So NtimeOFF is the Ntimer :)

João
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
Reacher10
Posts: 379
Joined: Tue Dec 27, 2011 7:46 pm
Country: -

Re: Trainer switch to toggle a cyclic mix?

Post by Reacher10 »

It's working great and I see how to set up the increments. This is a powerful feature.
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Trainer switch to toggle a cyclic mix?

Post by jhsa »

Wonderful :)
I will start using the short and long presses for playing telemetry data llike voltage, altitude, etc, as well as for example to reset the timer with a long press. So, one button has really 2 functions..

João
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
Reacher10
Posts: 379
Joined: Tue Dec 27, 2011 7:46 pm
Country: -

Re: Trainer switch to toggle a cyclic mix?

Post by Reacher10 »

Mike, Would it be possible to get more GVAR Adjusters? The momentary buttons are so handy. I used up the first 5 with the example above and could really use like 30 or 40 of them :shock:

I've said it before and I'll say it a million times...this FW is just sick....I LOVE IT. There is no possible way I could do without it.
User avatar
MikeB
9x Developer
Posts: 18000
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Trainer switch to toggle a cyclic mix?

Post by MikeB »

I could probably add some more, 30 sounds rather a lot though!

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Trainer switch to toggle a cyclic mix?

Post by jhsa »

Reacher10 wrote:Mike, Would it be possible to get more GVAR Adjusters? The momentary buttons are so handy. I used up the first 5 with the example above and could really use like 30 or 40 of them :shock:
That is the idea.. Ask for 40 and maybe you get 20 . ;) :lol: :mrgreen: :mrgreen:
I've said it before and I'll say it a million times...this FW is just sick....I LOVE IT. There is no possible way I could do without it.
Exactly the same here.
+1 definitely.. :)

João
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

Post Reply

Return to “er9x”