Are cyclic1 &2 reversed on Standard GUI 120 swash?

  • BirdBarber
  • BirdBarber's Avatar Topic Author
  • Offline
  • Hummingbird Assassin
More
10 Oct 2013 13:26 - 10 Oct 2013 15:18 #14445 by BirdBarber
I was trying to develop a Standard GUI model for flying a V922 with a Devo 8s and WL-T6 adapter in PPM mode, but cyclic1 and cyclic2 were reversed when choosing a 120 swash. Cyclic2 was on channel 1 and Cyclic1 was on channel 2. 120x swash didn't work either. (I know it's a flybarless heli, but it requires swash mixing from the TX, 1 servo 90 doesn't work.)

120 swash would sort of work if I switched the WL-T6 from Walkera to Futaba mode. It would operate the correct servos, but the swash mix was all messed up.

I am new to this, so the only way I could get it working in Walkera mode was to transfer the model.ini file to my PC and reverse cyclic1 and cyclic2 using Notepad++. It now flies great.

Also, if I convert the standard GUI to advanced, then back to standard, it reverses cyclic1 and cyclic2.

Am I doing something wrong, is cyclic1 on channel 1 and cyclic2 on channel 2 not supported, or is there a bug?

The working model is posted in the models forum as topic "Tested Standard GUI V922 WL-T6 Devo 8s combo"
Last edit: 10 Oct 2013 15:18 by BirdBarber. Reason: Additonal info

Please Log in or Create an account to join the conversation.

  • rbe2012
  • rbe2012's Avatar
  • Offline
  • So much to do, so little time...
More
10 Oct 2013 14:26 #14447 by rbe2012
Convert standard -> advanced: config is converted
Convert advanced -> standard: config is reset (nothing converted)!

Please Log in or Create an account to join the conversation.

  • BirdBarber
  • BirdBarber's Avatar Topic Author
  • Offline
  • Hummingbird Assassin
More
10 Oct 2013 14:56 #14451 by BirdBarber
I thought it reset it using the 6ch_heli.ini template, but that has cyclic1 on channel 1 and cyclic2 on channel 2.
Yet when I looked at my model.ini via notepad++ after it had been reset, it had them reversed.
It doesn't make sense to me.
It must get the reset template from somewhere else.

Please Log in or Create an account to join the conversation.

  • rbe2012
  • rbe2012's Avatar
  • Offline
  • So much to do, so little time...
More
10 Oct 2013 15:54 #14458 by rbe2012
Ok, now I see what you mean. I am quite sure that the numbering does not make any difference. When you look at the virtual channels you see CYC-AIL, CYC-ELE and CYC-COL - no numbers anymore.
I will look at this.

Please Log in or Create an account to join the conversation.

  • BirdBarber
  • BirdBarber's Avatar Topic Author
  • Offline
  • Hummingbird Assassin
More
10 Oct 2013 16:07 - 10 Oct 2013 16:08 #14460 by BirdBarber
The numbering does matter. If I leave cyclic2 on channel 1 etc the wrong servos are engaged. Elevator forward actually does a Aileron left or some such thing.
I didn't even want to try flying that! When I reversed the cyclic1 and cyclic2 with an editor on my PC then the correct servos were actuated, and the test flight went just fine.

Thanks for your replies.
Last edit: 10 Oct 2013 16:08 by BirdBarber. Reason: typo fix

Please Log in or Create an account to join the conversation.

  • BirdBarber
  • BirdBarber's Avatar Topic Author
  • Offline
  • Hummingbird Assassin
More
10 Oct 2013 16:11 #14461 by BirdBarber
Maybe they need a 3rd 120 swash option for PPM mode uses like this.
120 seems to be Futaba, 120x is different, but still not what I need.
Maybe a 3rd option like 120W for Walkera PPM is needed.

Please Log in or Create an account to join the conversation.

  • rbe2012
  • rbe2012's Avatar
  • Offline
  • So much to do, so little time...
More
10 Oct 2013 16:32 #14463 by rbe2012
In the code when changing advanced to standard mixer the model is reset and whatever it was before - it is a 6-channel heli afterwards. Or in other words:
in standard mode only 6-ch-helis are supported (where 4-ch-helis are a subset of 6-ch).
When changing from standard to advanced the settings are translated and the CYC-channels are introduced. You can see it here (in mixer_standard.c):
    MIXER_SetTemplate(mapped_std_channels.throttle, MIXERTEMPLATE_COMPLEX);
    MIXER_SetTemplate(mapped_std_channels.aile, MIXERTEMPLATE_CYC1);
    MIXER_SetTemplate(mapped_std_channels.elev, MIXERTEMPLATE_CYC2);
It can easily be changed (tested it out): CYC1 <--> CYC2 and everything is fine.
I did a practical test - easier than to read code for hours...
I have taken a working config for my Blade Nano CP-x and copied it twice. With both copies I changed the mixer mode to standard and back to advanced.
With the first I swapped CYC1 and CYC2 (so CYC1 ~ ele, CYC2 ~ ail). Ic ould fly as I was used to.
No change with the second - and the heli is not flyable. The swashplate tilts to wrong directions when moving the right stick (mode2, ail+ele).

So in the result I feel this is really a bug. Can anybody confirm that? If so, I will open a ticket in bitbucket (or you do) for not forgetting it. Solution is easy:
    MIXER_SetTemplate(mapped_std_channels.throttle, MIXERTEMPLATE_COMPLEX);
    MIXER_SetTemplate(mapped_std_channels.elev, MIXERTEMPLATE_CYC1);
    MIXER_SetTemplate(mapped_std_channels.aile, MIXERTEMPLATE_CYC2);

Please Log in or Create an account to join the conversation.

  • rbe2012
  • rbe2012's Avatar
  • Offline
  • So much to do, so little time...
More
10 Oct 2013 16:57 #14469 by rbe2012

rbe2012 wrote: I did a practical test - easier than to read code for hours...
I have taken a working config for my Blade Nano CP-x and copied it twice. With both copies I changed the mixer mode to standard and back to advanced.
With the first I swapped CYC1 and CYC2 (so CYC1 ~ ele, CYC2 ~ ail). Ic ould fly as I was used to.
No change with the second - and the heli is not flyable. The swashplate tilts to wrong directions when moving the right stick (mode2, ail+ele).


I have mixed it up: the first with the switches CYC1/2 was not flyable. I have built a new version and tested it out, it did not work. So it is correct as it is.
It is only confusing...

Please Log in or Create an account to join the conversation.

  • BirdBarber
  • BirdBarber's Avatar Topic Author
  • Offline
  • Hummingbird Assassin
More
10 Oct 2013 17:14 #14471 by BirdBarber
Maybe it's protocol specific?
The swash 120 setting in PPM protocol seems to output in Futaba layout and not Walkera layout.
Still seems like an extra swash option is needed.

Please Log in or Create an account to join the conversation.

More
14 Jul 2015 04:47 #35423 by Thomas.Heiss
Replied by Thomas.Heiss on topic Are cyclic1 &2 reversed on Standard GUI 120 swash?
Wow, another almost 2 years old thread complaining about interchanged Cyclic 1 and Cyclic2?!?

www.deviationtx.com/forum/6-general-disc...ngs-for-flybar#35089

Mantis bugtracker #624: www.deviationtx.com/mantisbt/view.php?id=624

Please Log in or Create an account to join the conversation.

More
14 Jul 2015 09:32 - 14 Jul 2015 09:33 #35435 by Thomas.Heiss
Replied by Thomas.Heiss on topic Are cyclic1 &2 reversed on Standard GUI 120 swash?
The mixer_standard.c header tells that "most code is derived from er9x and th9x".
Have there been any code fixes on those projects?
void STDMIXER_Preset() or STDMIXER_SetChannelOrderByProtocol()
{
....
mapped_simple_channels.aile = NUM_OUT_CHANNELS; // virt 1 (=CYC_AIL with AIL AS SRC)
mapped_simple_channels.elev = NUM_OUT_CHANNELS +1; // virt 2 (=CYC_ELEV with ELEV as SRC)
...

When is this code within the function called? What does it do?
Does it set ail channel to Cyclic1 and Elev to Cyclic2?

Where is the difference from the above code to
void STDMIXER_SetChannelOrderByProtocol()
{
MIXER_SetTemplate(mapped_std_channels.aile, MIXERTEMPLATE_CYC1);
MIXER_SetTemplate(mapped_std_channels.elev, MIXERTEMPLATE_CYC2);
}
Last edit: 14 Jul 2015 09:33 by Thomas.Heiss.

Please Log in or Create an account to join the conversation.

  • BirdBarber
  • BirdBarber's Avatar Topic Author
  • Offline
  • Hummingbird Assassin
More
15 Jul 2015 04:53 #35456 by BirdBarber

Thomas.Heiss wrote: ....Have there been any code fixes on those projects?...


I'm not sure anybody else is subscribed to this thread except us. I've never looked at this code or the 9X code, so you may need to re-post this elsewhere to get some of the developers attention. I haven't done any serious code in 15 years (retired...yay!.. I just fly helis now, lol)

Please Log in or Create an account to join the conversation.

More
08 Mar 2016 11:08 - 08 Mar 2016 13:28 #44253 by Thomas.Heiss
Replied by Thomas.Heiss on topic Are cyclic1 &2 reversed on Standard GUI 120 swash?
Another heli CCPM120 discussion thread with explanations from Hexfet (code changes in nightly-builds, either use search keywords heli or CCPM on BitBucket commit):
www.deviationtx.com/forum/3-feedback-que...ef0d76d?limitstart=0
Last edit: 08 Mar 2016 13:28 by Thomas.Heiss. Reason: link corrected

Please Log in or Create an account to join the conversation.

More
09 Mar 2016 10:07 - 09 Mar 2016 10:09 #44317 by Thomas.Heiss
Replied by Thomas.Heiss on topic Are cyclic1 &2 reversed on Standard GUI 120 swash?
www.deviationtx.com/forum/3-feedback-que...0-1-ef0d76d?start=20

hexfet wrote:

Thomas.Heiss wrote: The relevance between cyclic1, some input and cyclic1 to ELEV or AIL channels are still unknown. At least to me.
...

It is confusing and I'm not an expert, but now I do understand why I had such a hard time setting up my heli last year. I will work on a writeup for the manual, but short of time for the next couple months. If there's still questions after that maybe a skype session.
....
In the advanced GUI you can compensate for this by swapping cyclic assigments when moving between none and a mixed swash. In the standard GUI you'd have to swap the cables going to the AIL and ELE servos.


@Tim

Try swapping the cables for the front/back elevator cyclic servo as Hexfet suggested for the standard mixer GUI in the above thread.
Try AIL port instead of ELEV port.


In the advanced mixer GUI 3-ELEV channel is mapped to Cyclic1 and 2-AIL channel is mapped to Cyclic2.
For simple it was/is vice versa (could not test Hexfets template changes yet. Mixer.c seems to be rolled back to 3rd old version??).

As told you by PN I THINK that the mixer_standard.c code may just overwrite any template settings anyway??? I am not too sure about it. All lines with not any good inline comments.
Can you test this with your own code changes?

You may also want to try this, but it does not care enough for CCPM120/FBL settings as mixer.c does???
void STDMIXER_SetChannelOrderByProtocol()
{
MIXER_SetTemplate(mapped_std_channels.aile, MIXERTEMPLATE_CYC2); // was CYC1 before - see above
MIXER_SetTemplate(mapped_std_channels.elev, MIXERTEMPLATE_CYC1); // as advanced gui
}


You can also try to edit the model.ini and just change Cyclic1 to ELEV channel and Cyclic2 to AIL channel as others did (reported successfully in other heli CCPM threads).

Thomas
Last edit: 09 Mar 2016 10:09 by Thomas.Heiss.

Please Log in or Create an account to join the conversation.

More
10 Mar 2016 13:01 - 10 Mar 2016 13:45 #44372 by tcaudill01
I believe I have resolved the CCPM120 bug that has produced frustration in more than one person.
I have spent the past several evening and most of the weekend tracing code and experimenting.

The good news is that I have been able to trace down the code that is causing the issue, implemented some changes and produced a version that places the swash servos in the correct "TREX" style orientation and works with both unmodified Standard Heli and 6 Channel Advance INI's. "TREX" style servo orientation is AIL front right, ELE center rear, PIT left front. All menus and settings are mapped correctly to the correct channels.

I have tested it with 100% success on a DEVO10 connecting to an RX2801 and the much cursed RX2702 3-axis all-in-one. This was built and tested using the nightly from 03/04 (deviation-v4.0.1-40a7c30)

Now the bad news.
First, I have not tested this on any other receivers or brands of helis as I do not have access to any. So, I do not know if this code change will work on other systems or not.
Second, I haven't squashed the bug that erases everything when trying to go back to standard gui from advanced gui.
Third, and probably the worst, it WILL break any existing models you have that have a swash setting other than NONE.

I found the offending code in "mixer_standard.c"
line 59, 60, 83, 85
(edited)
59 mapped_std_channels.elev = NUM_OUT_CHANNELS; // virt 1
60 mapped_std_channels.aile = NUM_OUT_CHANNELS +1; // virt 2

82 else if (ch_map[ch] == INP_AILERON)
83 mapped_std_channels.actual_aile = mapped_std_channels.elev = ch;
84 else if (ch_map[ch] == INP_ELEVATOR)
85 mapped_std_channels.actual_elev = mapped_std_channels.aile = ch;

I simply swapped the word "aile" and "elev" for each line. Nothing else was touched.

Make sure you are using original version INI's. You can tell by looking at these two lines located in the first 10 to 20 lines of the INI. If they look like this, they are original.

[channel1]
template=cyclic2

[channel2]
template=cyclic1

Good luck using this and remember, it is probably going to break existing heli model.
Last edit: 10 Mar 2016 13:45 by tcaudill01. Reason: Added missing info

Please Log in or Create an account to join the conversation.

More
10 Mar 2016 14:06 - 10 Mar 2016 19:19 #44375 by Thomas.Heiss
Replied by Thomas.Heiss on topic Are cyclic1 &2 reversed on Standard GUI 120 swash?
This is the current / source checked-in template Heli/Standard GUI of nightly build default:
mixermode=Standard
[channel1] (DEVO =1-ELEV)
template=cyclic1

[channel2] (DEVO=2-AIL)
template=cyclic2

template=6Ch Helicopter
mixermode=Advanced

[channel1] (DEVO =1-ELEV)
template=cyclic1

[channel2] (DEVO=2-AIL)
template=cyclic2

Left servo PIT? Right servo AIL?
At least front/back ELEV servo stays ELEV (same on my Blade4503D) :-)
Problem is really the ELEV<->AIL servo thing anyways...

Hexfet told use that front/back servo shall be AIL in simple heli GUI. Same for FBL. Dunno why.
You still did not test this, right?

Funny. I have it vice versa with my 4503D advanced heli GUI model setup:
ELEV = front servo
AIL = left roll servo (looking from back to nose front)
PIT = right roll servo (looking from back to nose front)

This how I had seen it on one pic of Hexfet's linked threads.
Not sure which one is really CCPM120 standard and if there can be any front/back servo mapped to AIL instead of ELEV.
AIL/PIT are the roll servos for me.
ELEV is the name of the cyclic servo because it controls nick, not roll.

Make sure you are using original version INI's. You can tell by looking at these two lines located in the first 10 to 20 lines of the INI. If they look like this, they are original.


Is that the model.ini file written in your model setup by changing standard_mixer.c or what are you talking about exactly?
Did you have to manually edit the model.ini file to swap the channels?
The original default nightly-build ini's for simple+advanced heli templates ARE different.


I prepared a longer question e-mail for Hexfet on 0815 heli basic setup principles and (his) rolled back mixer changes :-)
As time allows me in ~April/May I hope to discuss some my points by chat / Skype personally rather forum.

Thomas
Last edit: 10 Mar 2016 19:19 by Thomas.Heiss.

Please Log in or Create an account to join the conversation.

More
10 Mar 2016 14:16 #44377 by Thomas.Heiss
Replied by Thomas.Heiss on topic Are cyclic1 &2 reversed on Standard GUI 120 swash?
BTW: Hexfet was/is right on heli FBL (CCPM None) setup.

I just checked my working V120D02s Spektrumized / ZYX-FBL advanced heli model.

2-AIL: Cyclic1
3-ELEV Cyclic2
CH6: Cyclic3
CYC-AIL: input AIL (stick)
CYC-ELEV: input ELE (stick)
CYC_COL: input THR( pitch stick)

Transmitter menu / channel monitor looks good.

On the same V120D02s ZYX-s DSMx heli I got another model setup for simple heli GUI.
Transmitter menu / channel monitor (AIL + ELEV sticks on above same channel) looks good too.
So standard mixer GUI (FBL, CCPM None) just works here for me as expected (will check model.ini channel mappings by USB later).

Hexfet is right. Its always the CCPM120 thing which is different.

Thomas

Please Log in or Create an account to join the conversation.

More
10 Mar 2016 15:29 #44380 by tcaudill01
Well, I guess you two are correct about all of the CCPM mixer issues and everyone that can't get your solutions to work must be doing something wrong :unsure: .

I simply posted this here because ALL the other edits and changes listed within these forums did not work for me with my particular hardware and heli's. I found what I felt was a solution and posted this for others to look at and try.
It was primarily aimed at those that want to use the standard GUI and the Swash 120 or 120X. This should not effect Swash=None setups as that setting should not need mixer inputs

As for original INI's, I was referring to the ones located in the template folder that come with the 4.0.1 zip file and contain none of hexfet's edits. bitbucket.org/hexfet/deviation/diff/src/...t=fix_heli_templates

Original:
[channel1]
min=-150
max=150
template=cyclic2

[channel2]
min=-150
max=150
template=cyclic1

Yes you can swap your servo leads around and make the regular deviation software work but it shouldn't need to be that way. It should work the way it is supposed to and you should be able to build and setup your heli as the manufacturer intended.
Also, swapping servos will not work for all-in-one receivers like the RX2702 as the internal gyros will no longer compensate the correct servos.

I was just trying to help and solve an issue that I felt needed to be addressed.

Please Log in or Create an account to join the conversation.

More
10 Mar 2016 18:32 - 10 Mar 2016 19:14 #44386 by Thomas.Heiss
Replied by Thomas.Heiss on topic Are cyclic1 &2 reversed on Standard GUI 120 swash?

It should work the way it is supposed to and you should be able to build and setup your heli as the manufacturer intended.


I would love for learning more to take a look at your heli manual about your exact swashplate setup picture. Would you link it?
Every manufacturer seems to do it differently. Lots of confusion.

Hexfet was linking 3 servo 120° 3 Servo layout picture: www.rchelicopterfun.com/ccpm.html
DeviationTX manual - swash 120 and 120X pictures: www.deviationtx.com/manuals/html-devo10/...ex.html#swash-mixing

"120 3 servos" is the way I setup my Blade 4503D (elevator cyclic servo in front/back).
Not sure what CCPM picture your heli is using.


Pull-Request #90: bitbucket.org/deviationtx/deviation/pull...i-heli-template/diff

Sorry my fault :-(
I somehow missed - even by re-reading multiple times - actually that Hexfet changed the heli_std.ini template and swapped AIL<->ELEV switch inputs on Virtchan1 and Virtchan2.
So heli_std.ini is now different to 6ch_heli.ini template.

bitbucket.org/deviationtx/deviation/diff...2c60519d3&at=default
[virtchan1]
[mixer]
-src=AIL
+src=ELE

 [virtchan2]
 [mixer]
-src=ELE
+src=AIL

With all those templates and standard_mixer.c I just can guess that it WILL make a difference if you either plug the front/back elevator cyclic servo to either the ELEV port on the receiver or the AIL port like Hexfet suggested in another thread above.

BTW: My 4503D is crashed with corrupt servos so I can NOT do right now any tests in all that kind like testing either mixer code files or template AIL-<->ELEV input switch changes.

I simply posted this here because ALL the other edits and changes listed within these forums did not work for me with my particular hardware and heli's


I am really interested to see your heli (what exact model, manual...) CCPM 120 naming picture.

One thing you might do different on your side (than me, not sure about Hexfet's heli) is that you plug the front/back elevator servo into the AIL RX port.

That is the last thing you could test on your side just to put it into the ELEV RX port instead of AIL.

As for original INI's, I was referring to the ones located in the template folder that come with the 4.0.1 zip file and contain none of hexfet's edits.


I referenced above the default / nightly-build templates.
Sorry, you already confused me again talking about "4.0.1" which actually would be release-4.0.1 (stable) :-)
If you are actually talking about a nightly-build you should NOT leave out the nightly-build internal version number to make it easier.
As nightly-build / developer default/trunk version != 4.0.1 stable release version.

Congratulations to you again that your code changes work Tim! :-)

Thomas
Last edit: 10 Mar 2016 19:14 by Thomas.Heiss.

Please Log in or Create an account to join the conversation.

More
10 Mar 2016 18:42 #44387 by hexfet
The root error in the code is in the switch statement in MIXER_CreateCyclicOutput(() in mixer.c. For SWASH_TYPE_NONE the assignments to cyc[0..2] are correct. For all the other swash types the cyc[0..2] assignment statements need to have all the elevator and aileron variables swapped. One of those threads Thomas referenced has some links to references on ccpm mixing equations with supporting information.

Other fixes are possible for specific use cases, but as far as I can tell any fix will break existing model files. For this reason PB did not want to change the mixing equations until support for versioning model.ini files is added

Please Log in or Create an account to join the conversation.

Time to create page: 0.067 seconds
Powered by Kunena Forum