- Posts: 4402
Trims and things
- PhracturedBlue
- Topic Author
- Offline
I went through many usage cases to see what capabilities we needed
below, where you see 'servo-adj' it implies:
servo-scaling, apply sub-trims, apply-reverse, apply hard-limits
- Simplest case: tx-input goes through the mixer
servo = tx-input->curve->mult->offset->trim->servo-adj - Dual rates/expo:
m1 = tx-input->curve1->mult1->trim
m2 = tx-input->curve2->mult2->trim
m3 = tx-input->curve3->mult3->trim
servo = sw0:m1 or sw1:m2 or sw2:m3 -> servo-adj
- CCPM Mixing: mix collective, aileron, elevator
m1 = aileron-stick->curve1->mult1->trim
m2 = elevator-stick->curve2->mult2->trim
m3 = throttle-stick->curve3->mult3 (normal)
m4 = throttle-stick->curve4->mult4 (idle-up sport)
m5 = throttle-stick->curve5->mult5 (idle-up 3d)
m6 = fmode0:m3 or fmode1:m4 or fmode2:m5 (collective)
servo1 = m6 + m2/2 - m1 -> servo-adj
servo2 = m6 + m2/2
servo3 = m6 + m2/2 + m1 -> servo-adj - Throttle on 6ch gas heli
m1 = 0%->offset->trim
m2 = throttle-stick->curve1->mult1->offset1 (normal)
m3 = throttle-stick->curve2->mult2->offset2 (idle-up sport)
m4 = throttle-stick->curve3->mult3->offset3 (idle-up 3d)
servo = m1 + !thold: (fmode0:m1 or fmode1:m2 or fmode3:m3) - V-tail:
m1 = aileron-stick->curve1->mult1->trim
m2 = elevator-stick->curve2->mult2->trim
servo1 = m1 + m2
servo2 = m1 - m2
If things are implemented as above it means:
1) The cyclic stuff has to be redone completely
2) The trim needs to be part of the mixer and cannot be applied at the servo-stage like sub-trim. This means separating the trims for the 2401 is still difficult. I want to try my 'fixed-point' implementation 1st, but if it doesn't work, we could special case it since the 2401 doesn't have CCPM, the trim can be moved to the end of the chain.
3) The 'trim' value will be part of the value displayed on the main screen (when the trim is enabled) because it is part of the mixer
4) The trim is 'attached' to a input (like a Tx stick) but is selectively applied by the mixer. We need a new control to toggle the trim on/off per-mixer
5) I assume above that I separate servo-scaling and the servo hard-limits
6) The mixer output can be greater than 100% since the trim is applied as part of it.
A few notes from the other thread:
CCPM is used with flybarless systems. The only difference seems to be that the gyro compensates the servos directly rather than the flybar/linkages adjusting the swash-plate
The nitro guys need the ability to apply trims to throttle, but only for idle adjustment.
Please Log in or Create an account to join the conversation.
- FDR
- Offline
Of course it is used!PhracturedBlue wrote: CCPM is used with flybarless systems. The only difference seems to be that the gyro compensates the servos directly rather than the flybar/linkages adjusting the swash-plate
It's just applied in the receiver (=all-in-1) not in the tx, at least for all the new Walkera CP helis, that I'm aware of. They all should be setup for swash type normal (=1 servo).
But you can try to be sure (I don't have a separate receiver and servos):
connect three servos to the RX1201's elevator, aileron and pitch output, and use the original DEVO 8 fw with the swash type set to normal. Do all three servos move on pitch change?
EDIT: Can you bind to the RX1201 with the original fw at all?
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Topic Author
- Offline
- Posts: 4402
Sorry I misunderstood.FDR wrote: Of course it is used!
It's just applied in the receiver (=all-in-1) not in the tx, at least for all the new Walkera CP helis, that I'm aware of. They all should be setup for swash type normal (=1 servo).
I used to be able to bind my RX1202 (before it got bound to a fixed-id). theoretically, I can still bind it to my Devo8 (but not Devo10) by using the same fixed-id. Assuming I calculated everything correctly. I will try it and see how the servos work in the different swash-modes
Please Log in or Create an account to join the conversation.
- FDR
- Offline
devo12s and RX1202 binding instructions
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Topic Author
- Offline
- Posts: 4402
Changes:
There is a new 'Trim' toggle button on each of the mixer page. this controls whether the trim is applied to this mixer (it is applied as the last step of the mixer). I just shoved it where it would fit. Feel free to move it around.
The max/min buttons have been removed from the mixer page. They are available on the 'channel' page only.
The channels are divided into 'real' and 'virtual' channels. The number of 'real' channels is limited by the number of channels selected on the model page. Virtual channels do not have any limits (reverse, max/min, servo-scale, sub-trim)
The cyclic is now applied as a template (past 'Complex'). When cyclic is used, the 1st 3 virtual channels will be the Cyclic source, and will be renamed appropriately
This was a large code rework, so there are probably many bugs still.
Please Log in or Create an account to join the conversation.
- FDR
- Offline
Here is for example your DR definition:
Why do you want to apply trims for each mixer, when they form a complex mixer, and replace each other for sure, while the trim value is the same.PhracturedBlue wrote: m1 = tx-input->curve1->mult1->trim
m2 = tx-input->curve2->mult2->trim
m3 = tx-input->curve3->mult3->trim
servo = sw0:m1 or sw1:m2 or sw2:m3 -> servo-adj
You could apply it once at the end of the complex mixer:
m1 = tx-input->curve1->mult1
m2 = tx-input->curve2->mult2
m3 = tx-input->curve3->mult3
servo = sw0:m1 or sw1:m2 or sw2:m3 -> trim -> servo-adj
The Walkera fw has an option to use (and store) separate trim values for each flight mode, but we don't, do we?
Now we can set if the mixer applies the trim value. But which one?
Trims are still bound to stick values, but a complex mixer doesn't necessarily bound to one stick input.
About the nitro idle: I see they cannot use the security feature for the throttle hold, because it gives a constant value, which the trim doesn't effect, however the could use a complex mixer with the throttle hold as the last page, which could use the trim value as source (scaled as needed).
But we don't have the trim values listed in the sources so far.
It would be useful elsewhere too...
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Topic Author
- Offline
- Posts: 4402
Because this doesn't work at all when you have a channel with multiple sources. I needed a solution that would work within the framework of the mixer we already have, and this is the best I could do.FDR wrote: To be honest, I don't fully understand even the OP, so I have some difficulty with the implementation too...
Here is for example your DR definition:
Why do you want to apply trims for each mixer, when they form a complex mixer, and replace each other for sure, while the trim value is the same.PhracturedBlue wrote: m1 = tx-input->curve1->mult1->trim
m2 = tx-input->curve2->mult2->trim
m3 = tx-input->curve3->mult3->trim
servo = sw0:m1 or sw1:m2 or sw2:m3 -> servo-adj
You could apply it once at the end of the complex mixer:
m1 = tx-input->curve1->mult1
m2 = tx-input->curve2->mult2
m3 = tx-input->curve3->mult3
servo = sw0:m1 or sw1:m2 or sw2:m3 -> trim -> servo-adj
trims are bound to a stick. so a complex mixer could have multiple trims in play if it has multiple sources. remember that a complex mixer is actually made up of a bunch of simple mixers.Now we can set if the mixer applies the trim value. But which one?
Trims are still bound to stick values, but a complex mixer doesn't
necessarily bound to one stick input.
Actually, they can use the safety feature, but they have to configure it in the ini file for now (to change the limit. Also, the trim can affect a constant value.About the nitro idle: I see they cannot use the security feature for the throttle hold, because it gives a constant value, which the trim doesn't effect, however the could use a complex mixer with the throttle hold as the last page, which could use the trim value as source (scaled as needed).
But we don't have the trim values listed in the sources so far.
It would be useful elsewhere too...
If you select 'src = THR' and 'curve = fixed' the trim will alter the constant.
Please Log in or Create an account to join the conversation.
- FDR
- Offline
Then it would be better if the button was not visible when there is no trims configured for that source...
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Topic Author
- Offline
- Posts: 4402
I can disable that easily enough. I am still not sure where to put the button for the expo_dr page though. We're basically out of room there.FDR wrote: Aha, so each mixer applies (or not) the trim appropriate to it's source.
Then it would be better if the button was not visible when there is no trims configured for that source...
Please Log in or Create an account to join the conversation.
- FDR
- Offline
Please Log in or Create an account to join the conversation.
- FDR
- Offline
FDR wrote: Yep, that page is quite full. I'll see what can I do...
Well, I moved it down on the simple and complex pages, but there is really no place on the expo page...
(EDIT: pushed...)
Do we need this setting on the simple and (relatively simple) expo page?
These are simplified versions of the full power complex page, which you can use instead, if you need.
The simple and expo page would always use trims if the source has one defined...
Please Log in or Create an account to join the conversation.
- FDR
- Offline
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Topic Author
- Offline
- Posts: 4402
So you would propose to use the complex page for the throttle and collective on 6ch electric helis?FDR wrote: So, do you think we need to define if trims are applied on all the mixer types?
Or just unmap the throttle trim
Please Log in or Create an account to join the conversation.
- FDR
- Offline
No big deal.
I used to use it for much simpler setups too...
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Topic Author
- Offline
- Posts: 4402
I've disabled it for now. We can put it back if it doesn't work outFDR wrote: Yep. Setting up a CCPM 6ch heli would require to use the complex mixer.
No big deal.
I used to use it for much simpler setups too...
Please Log in or Create an account to join the conversation.
- FDR
- Offline
I couldn't use any trim value as source of a channel. I understand, that they cannot be selected as a source, but I thought that if I select a source, and make the mixer function constant some way (with fixed or curve), and select that channel as the trim source, than it will affect it, but it does not.
Can it be achieved somehow?
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Topic Author
- Offline
- Posts: 4402
Why would you want to? Is this for the 2402 still? My current implementation won't let you control the trims for the 2402 this way since it is now coded as a 12biyt value instead.FDR wrote: A question:
I couldn't use any trim value as source of a channel. I understand, that they cannot be selected as a source, but I thought that if I select a source, and make the mixer function constant some way (with fixed or curve), and select that channel as the trim source, than it will affect it, but it does not.
Can it be achieved somehow?
However, I verified that what you asked does work:
Set Ch1:
Src=THR, Curve=Fixed, scale=0
Set Trim-Step = for Trim LV+/- (set stick to THR)
Go to channel page and see the trim change the channel output.
Please Log in or Create an account to join the conversation.
- FDR
- Offline
I just wanted to use trims for controlling other channels. I know, that it should work for the standard channels, zhat's why I tried to configure it to an other one to use the upper trims...
Please Log in or Create an account to join the conversation.
- Home
- Forum
- Development
- Development
- Trims and things