Need help with configuring 9x custom switches

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
User avatar
thomas9x
Posts: 230
Joined: Wed Feb 29, 2012 3:12 am
Country: -
Location: USA

Need help with configuring 9x custom switches

Post by thomas9x »

I am seeking advice on setting up some custom voices on my 9x (with Opentx-r-2249). In my project I'm providing an external PPM signal into the trainer input that is mixed to CH5 (and this part is working fine). I would like to have a different voice msg (flight mode) announcement as the CH5 pulse value changes. For example:
Msg 1 = 1000mS
Msg 2 - 1250mS
Msg 3 = 1500mS
Msg 4 = 1750mS
Msg 5 = 2000mS

The message needs to be announced upon a change of the pulse value (and not repeat over and over). I suspect that this is a classic setup for someone that has a 9x (with voice mod) and a APM equipped multi-rotor. So it would be awesome if someone could provide a link that shows an example on how this should be configured.

- Thomas

User avatar
thomas9x
Posts: 230
Joined: Wed Feb 29, 2012 3:12 am
Country: -
Location: USA

Re: Need help with configuring 9x custom switches

Post by thomas9x »

Thought I had this solved, but still working on it. I've created the flight phases and that is working great (the 9X LCD correctly reports the flight modes). But I need help with the voice announcements, which work similar to this video shows:

[BBvideo 425,350]http://www.youtube.com/watch?v=HWE3PVE0E9o[/BBvideo]

My working solution requires *ALL* of the custom switches and so now I don't have any spares to use for the other things I want to voice announce. Maybe there's a better way, so I'll post screenshots of my solution for review.

- Thomas
User avatar
thomas9x
Posts: 230
Joined: Wed Feb 29, 2012 3:12 am
Country: -
Location: USA

Re: Need help with configuring 9x custom switches

Post by thomas9x »

Here's the details on how I implemented my flight mode announcements. My solution takes too many custom switches so I need help compacting it down to use less of them.

I only needed four flight modes, which trigger when PPM5 (via the trainer port) is at 1000mS, 1250mS, 1500mS, and 1750mS. But in the end I consumed all the custom switches for the flight mode voice announcements.

My mix page:
Mix Settings. Flight modes are from PPM5.
Mix Settings. Flight modes are from PPM5.
My Custom Switches:
Custom Switch Settings.
Custom Switch Settings.
My Custom Functions:
Custom Function Settings.
Custom Function Settings.
Is there any chance that there's a more efficient way to do this? If not, then I will submit a new feature wish request to the developers. I've got ideas. :)

Thomas
bertrand35
9x Developer
Posts: 2764
Joined: Fri Dec 30, 2011 11:11 pm
Country: -

Re: Need help with configuring 9x custom switches

Post by bertrand35 »

Why don't you use the AND column at the right? It seems to me that you can spare CS2, CS3 and CS4
User avatar
thomas9x
Posts: 230
Joined: Wed Feb 29, 2012 3:12 am
Country: -
Location: USA

Re: Need help with configuring 9x custom switches

Post by thomas9x »

That is a great idea. With five flight modes your method indeed saves three custom switches. Unfortunately I need to free up a few more to handle my telemetry requirements. Any further suggestions would be fantastic.

Here's screenshots of the changes.

Custom Switches:
Custom Switches Screenshot. The logical order is a bit of spaghetti because of the limitations of the AND'ing.
Custom Switches Screenshot. The logical order is a bit of spaghetti because of the limitations of the AND'ing.
Custom Functions:
Custom Functions Screenshot.
Custom Functions Screenshot.
Five voice files were created to announce the flight modes, as follows:
0190: Manual Mode
0191: Stable Mode
0192: Loiter (GPS Hold)
0193: Home (GPS RTL)
0194: Circle

Hopefully this information helps out the next guy that needs to do something similar.

- Thomas

User avatar
MikeB
9x Developer
Posts: 17993
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Need help with configuring 9x custom switches

Post by MikeB »

You should be able to save one of CS3 and CS4 by using |a|< x PPM5 20.
This is ON if PPM5 is between -20 and +20.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
thomas9x
Posts: 230
Joined: Wed Feb 29, 2012 3:12 am
Country: -
Location: USA

Re: Need help with configuring 9x custom switches

Post by thomas9x »

You should be able to save one of CS3 and CS4 by using |a|< x PPM5 20.
Brilliant, that's classic Muntzing. :)

So here's the latest screenshots to help the next guy on this same journey:

Custom Switches Screenshot
Custom Switches Screenshot
Custom Switches Screenshot
Custom Functions Screenshot
Custom Functions Screenshot
Custom Functions Screenshot
Flight Mode Information
Flight Mode Information
Flight Mode Information
- Thomas
User avatar
MikeB
9x Developer
Posts: 17993
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Need help with configuring 9x custom switches

Post by MikeB »

Can you not use a !CSx to trigger a voice message?
CS1: a>x PPM5 -60
CS2: a<x PPM5 -20 AND CS1
CS3: |a|<x PPM5 20
CS4: a<x PPM5 60
CS5 a>x PPM5 20 AND CS4

Use !CS1 for one mode.
Use CS2 for the second.
Use CS3 for the third.
Use CS5 for the fourth.
Use !CS4 for the fifth.

Just the 5 custom switches!

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
thomas9x
Posts: 230
Joined: Wed Feb 29, 2012 3:12 am
Country: -
Location: USA

Re: Need help with configuring 9x custom switches

Post by thomas9x »

Mike, that's some fantastic Boolean work! I think this issue can be put to rest.

I'd post screenshots but Mike's details are all that's needed. Just enter his magic custom switch logic and go fly.

- Thomas
User avatar
LTMNO
Posts: 1049
Joined: Fri Nov 30, 2012 9:31 pm
Country: Canada
Location: Toronto, Canada

Re: Need help with configuring 9x custom switches

Post by LTMNO »

I apologize its taking me this long to find the response that MikeB wrote for my question... jhsa brought it up and i started to look for it and I couldnt find the response... This morning I tried again and found...

MikeB wrote:
Adding more custom switches causes the EEPROM structure to change, needing all saved models to be re-entered, and making eepe no longer compatible.

You have missed the possibility of using !SW1 (meaning NOT SW1, i.e. TRUE when SW1 is OFF. So you do not need SW2, SW5 or SW8.

SW1 v<ofs CH5 -80
SW2 --- --- ---
SW3 v<ofs CH5 -30
SW4 AND !SW1 SW3
SW5 --- --- ---
SW6 v<ofs CH5 0
SW7 AND !SW3 SW6
SW8 --- --- ---
SW9 v<ofs CH5 30
SWA AND !SW6 SW9
SWB --- --- ---
SWC v>ofs CH5 80

You now have 4 spare custom switches for your remaining mode.

Mike.

But it sounds like you got your answer,,,

apologies..
Custom 9x with M64/Telemetry Mod
User avatar
LTMNO
Posts: 1049
Joined: Fri Nov 30, 2012 9:31 pm
Country: Canada
Location: Toronto, Canada

Re: Need help with configuring 9x custom switches

Post by LTMNO »

I just redid mine, the Mike new solution is much nicer, now we have even more switches to save... ;-) Thanks Mike!
Custom 9x with M64/Telemetry Mod

Post Reply

Return to “openTx”