mapping trim switch

Programing help and example for all firmwares based on thus's th9 firmware.
Post Reply
Archilleselbow
Posts: 28
Joined: Mon Nov 05, 2012 10:16 pm
Country: -
Location: Johannesburg, South Africa

mapping trim switch

Post by Archilleselbow »

Is there a way to map the trim switches to.different channels? (To move a servo rather than to be used to trim the model)?

rdeanchurch
Posts: 750
Joined: Tue Dec 27, 2011 11:22 pm
Country: United States
Location: Carson City, Nv

Re: mapping trim switch

Post by rdeanchurch »

If you are using er9x, I don't think it is possible.
It can be done in openTx. Load companion9x and set the preference for your radio then look at the mixes. You can use TrmT, TrinR... for the trim next to throttle, rudder,... as the source for a channel. Best to disable the trim function of the stick you are using to control a channel output.

If you are using er9x, DO NOT try to use companion9x to download to your Tx, use eepe.

It is best to identify what your transmitter and firmware are when you ask a question
Dean
OldDmbThms: 1. Takeoff, 2. Crash, 3. Repair, GOTO 1
Archilleselbow
Posts: 28
Joined: Mon Nov 05, 2012 10:16 pm
Country: -
Location: Johannesburg, South Africa

Re: mapping trim switch

Post by Archilleselbow »

Oh yeah sorry ..
I use both opentx and er9x on a 9x and 9xr respectively
ReSt
Posts: 1581
Joined: Tue Dec 27, 2011 11:34 pm
Country: -

Re: mapping trim switch

Post by ReSt »

ER9x has "Crosstrim"
Don't know exactly which trim is used for which stick, but it will be easy to find out.
"When the option is turned on, (Crosstrim?) the trims are moved to the opposite stick, so that you can fly the poorly behaving axis and click the trims with the opposite hand. For example, if your aileron was on the right stick, and you wanted to give it one click of aileron trim, you would push the bottom left trim switch (the trim switch under the throttle stick in a mode 2 transmitter instead of the trim switch that's under the aileron)."
Other possibility:
This may be achieved using mixes, something like:
CH01: +100 AIL NO TRIM
CH01: +100 CH15
CH04: +100 RUD NO TRIM
CH04: +100 CH16
CH15: +100 RUD CURVE(c1) -- Curve 1 is flat = no stick output
CH16: +100 AIL CURCE(c1)

Channels 15 and 16 pick up just the trims of AIL and RUD
Channels 1 and 4 ignore their own trims and add in the opposite trims.

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

Re: mapping trim switch

Post by MikeB »

On er9x you need to use a GVAR.
On the main mix with the stick, turn off the trim so it does not affect the channel.
On the GVAR page, choose a GVAR and select the trim as it's input.
On a mix, choose the GVAR as the source.

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: mapping trim switch

Post by jhsa »

As simple as that :)
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: 17992
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: mapping trim switch

Post by MikeB »

Prime candidates for this are GVAR6 and GVAR7, they cannot be used in places like mix weight and expo settings, only GVAR1-5 can be used for that. It's mainly why I added GVAR6 and 7.

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: mapping trim switch

Post by jhsa »

Question,
When you turn the radio off and on again, will the GVAR value and therefore the channel position be stored in the eeprom and go to it's last position, or will it be reseted to 0?
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: 17992
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: mapping trim switch

Post by MikeB »

If you select a trim as the GVAR source, then the trim value IS the GVAR value. Since the trim value is saved, the GVAR value is saved.
The trim values go from -125 to +125. When used through a GVAR as a mix source, this value is multiplied by 8 to give -1000 to +1000, very close to the -1024 to +1024 for the channels.

There are two things regarding the use of trims as GVARS.
1. Every time you change the trim, the EEPROM is updated.
2. On er9x, the current implementation uses the trim value from FLIGHT MODE 0 (I just checked!). There is therefore a question of whether this is correct, or it should use the trim value from the currently active FLIGHT MODE (probably yes).

As an aside, I'm not quite sure why the channels go from -1024 to +1024. I'm beginning to think -1000 to +1000 (units of 0.5uS) would actually be better. There are scalings that map from 100 or 1000 to 1024. I might just look into why 1024 is used!

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
Archilleselbow
Posts: 28
Joined: Mon Nov 05, 2012 10:16 pm
Country: -
Location: Johannesburg, South Africa

Re: mapping trim switch

Post by Archilleselbow »

Mmm I wanted to map the trims to pan tilt for the cam and then maybe a switch mapped to the same channel to center the camera?
Any suggestions on how to do this?

Post Reply

Return to “er9x / gruvin9x / th9 based firmwares”