Menu additions/ generic menu page

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
archer183
Posts: 97
Joined: Mon Oct 08, 2012 4:31 am
Country: -

Menu additions/ generic menu page

Post by archer183 »

how difficult would it be to create a generic-ish menu page so that folks that want to write their own complex mixing in the code itself can easily set parameters with it? Right now I am hijacking the global variables to set parameters for the turret convergence code. It would be useful to me (and maybe to others, if there are any, that are writing their own mixing in the source code) if I could add a menu with several settings for input selection (e.g. allow easy selection of any mixer output or any calibrated stick or button input) along with a few 4-8 bit settable parameters for use elsewhere in the code.

thanks
Greg

KanishkaRC
Posts: 35
Joined: Sun Sep 02, 2012 8:57 pm
Country: -

Re: Menu additions/ generic menu page

Post by KanishkaRC »

hi,,

Actually as each and every menu has its own function separate from others, adding a new menu is not relatively a that difficult task once you understand the code.
refer to a small menu function code first and you will understand the basics.
Open9x might be somewhat difficult to understand at the beginning as the code-base is larger. but if you try to do what you want in th9x or er9x first it might be easier.

For example if you do it in th9x.
add your function in MenuFuncP_PROGMEM APM menuTabModel[] and try to set the menustack pointer to your function in where ever you want to call your funtion.

Other simpler thing would be: you can change an existing menu function to edit your parameters.

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

Re: Menu additions/ generic menu page

Post by bertrand35 »

You will change it in open9x the same way explained above. To insert a menu you have:

- the new menu function to implement
- it's function pointer to add to the array
- the "pages" enum to update

That's all. I suggest you copy/paste the page which looks like the one you want to add and start modifications from there ...

Bertrand.

Post Reply

Return to “openTx”