COPY TRIM option in limits menu only works for some trims

ersky9xr is the port of the er9x firmware to the 9XRPRO radio.
Post Reply
hbunjes
Posts: 11
Joined: Mon Sep 08, 2014 10:12 am
Country: -

COPY TRIM option in limits menu only works for some trims

Post by hbunjes »

I have one-line-mixes for rudder and elevator.
I have two-line-mixes for my two aileron channels

I adjusted trims for all 3 sticks during flight.
Then I committed a "COPY TRIM in the limits page.

Trims for rudder and elevator are copied to the limits page.

Trims for the ailerons are not copied.

Info: I had the plane conected while commiting the COPY TRIM and when I pressed [MENU] the aileron servos turned back to zero, forgetting their trim.


Is this known behaviour?
Last edited by hbunjes on Sun Oct 05, 2014 4:44 pm, edited 1 time in total.

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

Re: COPY TRIM option in limits menu only works for some trim

Post by jhsa »

I just tried it on a simple model and all the trims were copied..
What mixes do you have on the aileron channel? Or better yet, please post your eeprom here..

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
hbunjes
Posts: 11
Joined: Mon Sep 08, 2014 10:12 am
Country: -

Re: COPY TRIM option in limits menu only works for some trim

Post by hbunjes »

Thanks João!

I will try to send the settings file this evening after work.
hbunjes
Posts: 11
Joined: Mon Sep 08, 2014 10:12 am
Country: -

Re: COPY TRIM option in limits menu only works for some trim

Post by hbunjes »

Here is the requested file.

I use flight modes. It might be that I failed to understand a flight mode related side effect.
Attachments
F-BMKE.eepm
This is the settings file that I created via the "Model Select Page"
(3.06 KiB) Downloaded 350 times
User avatar
MikeB
9x Developer
Posts: 17993
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: COPY TRIM option in limits menu only works for some trim

Post by MikeB »

I'll have a look later. It may be that there is some odd problem related to flight modes. All the trims in all the flight modes need to be checked/adjusted. I may well have something not quite right in there.

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

hbunjes
Posts: 11
Joined: Mon Sep 08, 2014 10:12 am
Country: -

Re: COPY TRIM option in limits menu only works for some trim

Post by hbunjes »

Here is the bin file saved from eePskye.
Attachments
turnigy_2014-09-16.zip
(1.1 KiB) Downloaded 241 times
User avatar
MikeB
9x Developer
Posts: 17993
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: COPY TRIM option in limits menu only works for some trim

Post by MikeB »

I can see you seem to have a problem. I loaded your EEPROM and got a similar result. With my original EEPROM, however, all trims get transferred OK. I'll have to investigate further to see what is happening!

Mike.

Edit: May be something very obscure relating to using the sticks in mode 4.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
hbunjes
Posts: 11
Joined: Mon Sep 08, 2014 10:12 am
Country: -

Re: COPY TRIM option in limits menu only works for some trim

Post by hbunjes »

Thanks for having a look!

I'm a programmer myself and quite curious what the problem might be.

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

Re: COPY TRIM option in limits menu only works for some trim

Post by MikeB »

Just done some more investigation. It looks like modes 3 and 4 have the problem, where the aileron is on the left stick, and the trim for the aileron doesn't copy.
I may have a fix, I just did a quick test and it seems to now work correctly, more testing tomorrow now.

At some point last year I did a major change to the way the stick mode was handled. Previously, if you changed the stick mode, then the mixes got renamed as they were tied to the physical stick, not the logical function of the stick. This caused some problems, and also meant copying a model from a Tx in (say) mode 1, to a Tx in (say) mode 2, didn't work either. Now, mixes are tied to the logical function, so changing stick mode no longer upsets the mixes.
This all caused all sorts of problems to sort out to make sure sticks and trims correctly follow the stick mode.
It looks like a specific bit of code relating to the copy trim function didn't work in modes 3 and 4.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
hbunjes
Posts: 11
Joined: Mon Sep 08, 2014 10:12 am
Country: -

Re: COPY TRIM option in limits menu only works for some trim

Post by hbunjes »

I totally understand why you had to insert the abstraction layer of "logical stick function". I didn't mention my stick mode because I didn't know that once "trim copy" knew about "physical sticks".

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

Re: COPY TRIM option in limits menu only works for some trim

Post by MikeB »

I've posted test versions for the 'PRO and SKY boards here: viewtopic.php?f=7&t=4676&p=65894#p65894.
I think this fixes the COPY TRIM bug, but needs careful testing, in all stick modes, to be certain it is correct in all cases.
I shall be doing more testing myself.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
hbunjes
Posts: 11
Joined: Mon Sep 08, 2014 10:12 am
Country: -

Re: COPY TRIM option in limits menu only works for some trim

Post by hbunjes »

Great, thanks!

Are you sure (enough) that only the change of subtrim is affected by your fix?
I ask because I'd like to know if when testing "copy trim" I only have to check the correct new value of subtrim or if I have to check other possible (side) effects as well.

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

Re: COPY TRIM option in limits menu only works for some trim

Post by MikeB »

Yes, there should be no side effects to the change.
The way it works is to run the mixer twice, once with sticks and trims zero and once with them as they are currently set (same code used for "instaTrim"). Then, ignoring the throttle stick and trim, the channel differences are entered in the sub-trim for each channel and the trims set to 0. The only change I did was to do with the mixer run with trims set to zero.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
hbunjes
Posts: 11
Joined: Mon Sep 08, 2014 10:12 am
Country: -

Re: COPY TRIM option in limits menu only works for some trim

Post by hbunjes »

Your fix seems to work fine. I marked the thread as solved.
Thanks

Post Reply

Return to “ersky9xr”