×

Notice

The forum is in read only mode.

Independent trims for flight modes

More
29 Jan 2018 05:31 #67241 by Hayataro
Replied by Hayataro on topic Independent trims for flight modes
I'ms sorry slightly old topic...
By my language barrier, I can't understand how many "flight-modes" can I make.
I saw source codes and found descriptions "FMOD0 FMOD1 DMOD2".
Do there mean only 3 indipendent trim sets (=flight modes) can be make?
Or over 5 modes? I'm a sailplane flyer so I need 4 or 5 flight-modes.

using same ID in RCGroups.
More
29 Jan 2018 06:15 - 29 Jan 2018 06:38 #67242 by vlad_vy
Replied by vlad_vy on topic Independent trims for flight modes
By the way, with nightly builds I can't select "FMODE" or other similar switch for trims "Switch", I can select "FMODE0", "FMODE1" or "FMODE2" only, so now it impossible to setup independent trims for flight modes. With v5.0.0 release build it is possible.

Nightly builds devo8:


v5.0.0 devo8:
Attachments:
Last edit: 29 Jan 2018 06:38 by vlad_vy.
More
29 Jan 2018 06:33 - 29 Jan 2018 07:15 #67243 by vlad_vy
Replied by vlad_vy on topic Independent trims for flight modes
Just checked it with emulator, it works for nightly builds with "FMODE0" switch, but it's confusing. With "FMODE1" it has 2 trims only, with "FMODE2" it has 1 trim only.

I don't think it is normal behaviour.

It's related to next commit:
github.com/DeviationTX/deviation/commit/...c0a3ec01d4a28a7f9d6d

I don't know what is #600 issue.
Last edit: 29 Jan 2018 07:15 by vlad_vy.
More
29 Jan 2018 08:41 #67245 by Moeder
More
29 Jan 2018 08:56 - 29 Jan 2018 09:03 #67246 by vlad_vy
Replied by vlad_vy on topic Independent trims for flight modes
I don't see any sense in #600 fix. The trims "Switch" field is intended to enable multiple trim positions for Flight modes. So, it was intentional choice for "FMODE" format, without position indicator.

www.deviationtx.com/forum/3-feedback-que...modes?start=20#10763

I think will be better to return it back.
Last edit: 29 Jan 2018 09:03 by vlad_vy.
More
29 Jan 2018 09:20 #67247 by vlad_vy
Replied by vlad_vy on topic Independent trims for flight modes
At any case, we can't have >3 flight modes independent trims. Even if we will use spare trims, we have only 2-6 spare trims.
More
29 Jan 2018 18:33 - 29 Jan 2018 18:35 #67265 by vlad_vy
Replied by vlad_vy on topic Independent trims for flight modes
Now I can setup 6 independent trim sets, with two switches (2-pos + 3-pos) and 6 contiguous virtual channels (6-pos switch). With minimal code change.

I don't know if it has any sense. Too many virtual channels were used.
Last edit: 29 Jan 2018 18:35 by vlad_vy.
More
29 Jan 2018 18:43 #67266 by FDR
Replied by FDR on topic Independent trims for flight modes
I think it's fine, I was thinking of a similar solution.
How do you do that?
Name the virtual channels as for example: vsw0, vsw1, vsw2, vsw3, vsw4 and select "vsw" somehow?
More
29 Jan 2018 18:56 #67267 by vlad_vy
Replied by vlad_vy on topic Independent trims for flight modes
You need select the first virtual channel only.

But now something went wrong. I need additional testing. Probably I miss something.
More
29 Jan 2018 22:10 #67268 by Hayataro
Replied by Hayataro on topic Independent trims for flight modes
Please ... please answer to my question....

using same ID in RCGroups.
More
30 Jan 2018 04:57 - 30 Jan 2018 05:05 #67271 by vlad_vy
Replied by vlad_vy on topic Independent trims for flight modes
Fixed, now it works. Forget to save and read 3 additional trims positions.

Hayataro, work in progress. Right now you can use 3 independent trims set, assign to trim "Switch" (at trim properties) any 3-pos switch, position 0, for example "FMODE0".

After fix will be applied you can use "FMODE" for 3 trims set. With next fix you can use 4-6 contiguous virtual channels to setup 4-6 pos switch, assign to trims "Switch" first virtual channel and you will have 4-6 trims set.

Right now I testing 6-pos virtual channels switch (it use GEAR and FMODE switches) and 6 independent trims set. The virtual channels switch at any state should have only single channel with +100% value, all others -100%.
[virtchan1]
template=complex
[mixer]
src=FMODE0
dest=Virt1
usetrim=0
curvetype=expo
points=0,0
[mixer]
src=AIL
dest=Virt1
switch=GEAR1
scalar=-100
usetrim=0
curvetype=fixed

[virtchan2]
template=complex
[mixer]
src=FMODE1
dest=Virt2
usetrim=0
curvetype=expo
points=0,0
[mixer]
src=AIL
dest=Virt2
switch=GEAR1
scalar=-100
usetrim=0
curvetype=fixed

[virtchan3]
template=complex
[mixer]
src=FMODE2
dest=Virt3
usetrim=0
curvetype=expo
points=0,0
[mixer]
src=AIL
dest=Virt3
switch=GEAR1
scalar=-100
usetrim=0
curvetype=fixed

[virtchan4]
template=complex
[mixer]
src=FMODE2
dest=Virt4
usetrim=0
curvetype=expo
points=0,0
[mixer]
src=AIL
dest=Virt4
switch=GEAR0
scalar=-100
usetrim=0
curvetype=fixed

[virtchan5]
template=complex
[mixer]
src=FMODE0
dest=Virt5
usetrim=0
curvetype=expo
points=0,0
[mixer]
src=AIL
dest=Virt5
switch=GEAR0
scalar=-100
usetrim=0
curvetype=fixed

[virtchan6]
template=complex
[mixer]
src=FMODE1
dest=Virt6
usetrim=0
curvetype=expo
points=0,0
[mixer]
src=AIL
dest=Virt6
switch=GEAR0
scalar=-100
usetrim=0
curvetype=fixed

[trim1]
src=LEFT_V
pos=TRIMLV+
neg=TRIMLV-
switch=Virt1
value=-1,-12,-26,-38,-52,-64
[trim2]
src=RIGHT_V
pos=TRIMRV+
neg=TRIMRV-
switch=Virt1
value=-1,-12,-26,-38,-52,-64
[trim3]
src=LEFT_H
pos=TRIMLH+
neg=TRIMLH-
switch=Virt1
value=-1,-11,-23,-39,-53,-64
[trim4]
src=RIGHT_H
pos=TRIMRH+
neg=TRIMRH-
switch=Virt1
value=-1,-11,-25,-39,-52,-65
Last edit: 30 Jan 2018 05:05 by vlad_vy.
More
30 Jan 2018 05:05 - 30 Jan 2018 05:06 #67272 by Hayataro
Replied by Hayataro on topic Independent trims for flight modes
Hi vlad_vy -san,, Thank you soooo much!!!

3 flight modes are minimum for sailplane pilots, because FM0->Cruise(largest L/D), FM1->Thermal(Minimum sink ratio), FM2->Launch(Minimul drag), luck of "Speed mode" runs in windy days.
Could you please add another 1 or 2 modes to Deviation?

If so, using T8SG(plus) / iR8M will be to very powerful equipment for us.

using same ID in RCGroups.
Last edit: 30 Jan 2018 05:06 by Hayataro.
More
30 Jan 2018 05:46 - 30 Jan 2018 05:47 #67273 by vlad_vy
Replied by vlad_vy on topic Independent trims for flight modes
Pull request placed:
Add support for 6 independent trims set #347

You can use 4-6 contiguous virtual channels to setup 4-6 pos switch, then assign to trims "Switch" the first used virtual channel and 
you will have 4-6 independent trims set. The virtual channels switch at any state should have only single channel with +100% value, 
all others -100%. It's intended for for 4-6 flight modes with independent trims settings.
Last edit: 30 Jan 2018 05:47 by vlad_vy.
More
31 Jan 2018 03:21 #67293 by Hayataro
Replied by Hayataro on topic Independent trims for flight modes
Thanks! I'll try.
Whitch filmware shoud I use? Please tell me... vlad_vy-san.

using same ID in RCGroups.
More
31 Jan 2018 03:33 #67294 by vlad_vy
Replied by vlad_vy on topic Independent trims for flight modes
Pull request is not accepted while.
More
31 Jan 2018 04:04 #67298 by Hayataro
Replied by Hayataro on topic Independent trims for flight modes
Hi vlad_vy-san, I'm sorry I can't understand meybe by a language barrier. (I'm so sorry)
I own iRangeX iR8M. Nightly build for T8SG is suit for this TX?

using same ID in RCGroups.
More
31 Jan 2018 04:38 #67300 by vlad_vy
Replied by vlad_vy on topic Independent trims for flight modes
No, but you can use my build for iRangeX iR8M:

www.deviationtx.com/forum/builds/7605-irangex-irx-ir8m-builds
More
31 Jan 2018 04:52 #67302 by vlad_vy
Replied by vlad_vy on topic Independent trims for flight modes
I added iRangeX iR8M build with support for 6 independent trims set:

www.deviationtx.com/forum/builds/7605-ir...rx-ir8m-builds#67301
More
31 Jan 2018 11:35 - 31 Jan 2018 14:08 #67303 by vlad_vy
Replied by vlad_vy on topic Independent trims for flight modes
I have new idea about 6 independent trims set. I can switch to the set of trims by analog value of any channel: channel = 16 + sw_pos * 33.

In other words:
pos1 = -100% to -67%
pos2 = -67% to -34%
pos3 = -34% to -1%
pos4 = -1% to 32%
pos5 = 32% to 65%
pos6 = 65% to 100%

This way we need only one virtual or any channel to switch sets of trims.
s8 *MIXER_GetTrim(unsigned i)
{
    if (Model.trims[i].sw) {
        int num_positions = INPUT_NumSwitchPos(Model.trims[i].sw);
        if (num_positions != 0) {
            for (int j = 0; j < num_positions; j++) {
                // Assume switch 0/1/2 are in order
                if(raw[Model.trims[i].sw + j] > 0) {
                    return &Model.trims[i].value[j];
                }
            }
        } else {
            for (int j = 0; j < 6; j++) {
                // Assume channel switch step is 3333
                if((raw[Model.trims[i].sw] > CHAN_MIN_VALUE + 1 + j * 3333) && 
                   (raw[Model.trims[i].sw] <= CHAN_MIN_VALUE + 1 + (j + 1) * 3333)) {
                    return &Model.trims[i].value[j];
                }
            }
        }
    }
    return &Model.trims[i].value[0];
}
Last edit: 31 Jan 2018 14:08 by vlad_vy.
More
31 Jan 2018 11:51 #67304 by FDR
Replied by FDR on topic Independent trims for flight modes
Yeah, but it contradicts with the definition of a switch in deviation...
Time to create page: 0.699 seconds
Powered by Kunena Forum