Reversed elevon in stabilized mode

I’m setting up a Wing Wing Z-84 with a Pixracer R14 and the latest PX4 flight stack release v1.8.0 using QGC v3.3.2

However, the roll correction is always backwards in stabilized mode (the ailerons always move in the opposite of the correct stabilization direction). The pitch works properly in stabilized mode and in manual mode everything works, but I cannot get the roll correction to work.

I’ve reversed the Taranis RC input, recalibrate, and power down; but the roll behavior in stabilized mode still persists. I’ve also changed the RC?_REV parameter (which btw resets to default if you recalibrate) and power down, but same thing.

Here is the log in case someone can spot the issue. TIA!

Did you try swapping the servo plugs between MAIN1 and MAIN2?

Good luck.

Yes, I did and it didn’t make any difference. It’s really puzzling since I know @LorenzMeier got it working with previous version of the flight stack.

That just doesn’t make sense. What Tx are you using? Did you create any elevon mixing? If you did, you need to remove it make it just a standard setup of CH1-4 in AETR or TAER sequence. Whichever you use, make sure it calibrates correctly in QGC. If you confirm that your servos are connected as below, you can either try using an older version like 1.7.3 or @LorenzMeier will hopefully be able to assist.

MAIN1: left aileron
MAIN2: right aileron
MAIN4: throttle

Good luck.

I’m using a Taranis with a D4R-II receiver. No, I didn’t recreate any elevon mixing, just the standard CH1-4 in AETR setup and re-calibrated multiple times via QGC.

How are you connecting the Rx to the Pixhawk? Are you using a PPM encoder?

No, I’m not using a PPM encoder. The D4R-II already supports PPM so it’s connected to the Pixracer using a single cable. Notice that the elevons work correctly in Manual mode. The issue is with the roll correction in stabilized mode; which is mainly controlled by the firmware code. Therefore, the correction should happen without TX inputs.

Hi Al,

What pins are you connecting a single cable at on a Frsky V8r4-II? To the best of my knowledge that is a all pwm receiver, the D4r-II has ppm single cable out. These are two different receivers.

I could be absolutely incorrect here, as I often am. Most FRsky receivers that work with Tarranis and correct Tx modules begin with D or X to be px4 compatible.

I have never hooked up a pwm receiver to a ppm FC so I have no clue what would happen. The pic of QGC radio lost in your first post flashing in milliseconds comes to mind.

If you have time send pic of receiver wired. Just trying to help and also learn from others.

Hi Mitchell,

That was my typo. I’m indeed using the D4R-II with a single cable (CPPM). The problem is that I cannot change PWM_MAIN_REV* params via QGC. Therefore, it seems that I’ll have to add them manually into the 3033_wingwing file and rebuild the firmware.

Hi @Al_B ,

Can you confirm that the roll orientation is estimated in the correct direction by looking at the artificial horizon in QGC?

Hi Bresch,

Yes, I can confirm that the roll orientation is estimated in the correct direction, see here.

Based on that, if you swapped the servo leads between MAIN1 and MAIN2, it should correct it.

Good luck.

Swapping the servo leads does not make any difference. In previous release of the firmware, you just had to reverse the PWM_MAIN_REV* params, but those params are now missing in the latest v.1.8.0 release.

Now, that doesn’t make sense at all. And to make sure we’re on the same page, I’m not talking about doing any reversing in the parameters. If according to the video, you roll the wing to the right and the right aileron goes up and (presumably) the left aileron goes down, then by swapping the servo leads on the Pixracer will reverse what physically takes place at the servo.

Have you tried reversing how the servo is mounted in the wing, i.e. if it’s laying on its left side, lay it on its right side?

Good luck.

@rollys, when I swap the servo leads and I roll the wing to the right, the right aileron continues to go up and the left aileron continues to go down. Swapping leads or servos does not make any difference if the code is handling the roll orientation backward in stabilized mode. I hope @LorenzMeier or @dagar can chime-in or confirm.

Do you have a similar flying wing (not a converted VTOL) where you can try to upgrade to the latest firmware v1.8.0?

  • I have a Pixhawk, not a Pixracer but when I get some time or chance, I’ll try it to do a test.
  • Have you tried loading v1.7.3 and see if it corrects it? (I doubt it would make a difference.)
  • Not that I don’t believe you but follow my logic here… if the left aileron is plugged in MAIN1 and the right aileron in plugged in MAIN2 and you roll to the right and the right aileron goes up and the left goes down, it means that the flight controller sent an UP command through MAIN2 (right) and DOWN command to MAIN1 (left). If you swapped the servos, the FC would still send the same commands, i.e. UP at MAIN2 and DOWN at MAIN1 but now it’s the right servo that’s getting the DOWN signal (MAIN1) and the left servo is getting the UP signal (MAIN2), right? The FC doesn’t know nor care what you plugged in the port except to send the signal it’s supposed to.
  • I still believe it’s a mechanical issue rather than anything to do with the firmware but I’m not there.

Good luck.

@rollys, notice that if this would have been a mechanical issue, then the same behavior had manifested in manual mode. I really appreciate you tried to help, but let’s wait until someone familiar with the code can chime in and explain why PWM_MAIN_REV* params are not longer visible in the v1.8.0 release. Good luck to you too!

Hi @AI_B ,

In order to invert the output of the PWM ports of the PixRacer, you unfortunately have only two options:

  • Physically turn the servos (not always easy)
  • Change the mixer

I can give you a binary of PX4 v1.8.0-rc0 with the corrected mixer if needed.

Hi Bresch,

I’ll prefer to take your binary, load it, and recalibrate everything again. Can you attach it here?

Is this the mixer file that you are suggesting to change? Also, why will you use v1.8.0-rc0 instead of v1.8.0; which is the latest stable release?


@bresch Could you please post the binary or the link here so we can share with anyone else that may have this issue?