So I realized that I wanted a few extra global variables in the stock board to play with. I've got plenty of space left to add some in the modified open9x I've been playing around with. I found the right spot to increase the quantity so that in the curves menu I get say 7 instead of 5 global variables, and values I put in there are saved when the tx is powered off. what I have not figured out is what I missed so those variables will show up in the mix menu? can someone point me to the block of code that deals with the mix menu and global variables? I can probably figure it out from there.
thanks
Greg
increasing number of global variables on stock board
Re: increasing number of global variables on stock board
I don't think it is possible without changing the eeprom structure. One byte is used for mixer value. -125 to 125 is 251 values. Leaving 5 values for the gvars...
Re: increasing number of global variables on stock board
If that be the case then I can readily live with it by relocating the input parameters to my custom code I use gvars 1-5 for to gvars 6-10 and reserve 1-5 for normal usage. Now onto finding the section of the code that puts gvar1-n in the menu and rename it something else for the ones I am hijacking
-
- 9x Developer
- Posts: 2764
- Joined: Fri Dec 30, 2011 11:11 pm
- Country: -
Re: increasing number of global variables on stock board
Have a look to my last commit, I added the negative GVxx which can be useful for differential. You will be able to select there -GV5 .. -GV1 and GV1 .. GV5.
Now if you want more global vars, it's a little bit more difficult, because of the 256 values of a byte... But if you don't need to go from -125 to 125, it's rather easy. You will have to modify 2 functions:
- gvarMenuItem(...)
- GET_GVAR(...)
For the mixer you have to search for "MixOne" in model_menus.cpp
Bertrand.
Now if you want more global vars, it's a little bit more difficult, because of the 256 values of a byte... But if you don't need to go from -125 to 125, it's rather easy. You will have to modify 2 functions:
- gvarMenuItem(...)
- GET_GVAR(...)
For the mixer you have to search for "MixOne" in model_menus.cpp
Bertrand.
- Rob Thomson
- Site Admin
- Posts: 4543
- Joined: Tue Dec 27, 2011 11:34 am
- Country: United Kingdom
- Location: Albury, Guildford
- Contact:
Re: increasing number of global variables on stock board
At last. Negative gvar is superb!
Sent from my GT-I9300 using Tapatalk 2
Sent from my GT-I9300 using Tapatalk 2
Slope Soaring, FPV, and pretty much anything 'high tech'
...........if you think it should be in the wiki.. ask me for wiki access, then go add it!
...........if you think it should be in the wiki.. ask me for wiki access, then go add it!
-
- 9x Developer
- Posts: 2764
- Joined: Fri Dec 30, 2011 11:11 pm
- Country: -
Re: increasing number of global variables on stock board
Right. It's difficult to work on features, add new boards support + real work and real life. Ok I must go, the baby is calling
Bertrand.
Bertrand.
Re: increasing number of global variables on stock board
The software is already great! With negative gvars it is even better.
But family life is more important!
Verstuurd van mijn TF300T met Tapatalk
But family life is more important!
Verstuurd van mijn TF300T met Tapatalk