Matek F765-Wing Accelerometer thinks board is Yawed 180

Hi all,
I’m using Arduplane and 4.1.2 and after flashing from 4.1.1 and I reset the parameters because I am moving the board to another plane and now when I calibrate it, it completes but the roll is switched as if the board was with AHRS_ORIENTATION=4 (yaw180) but it is not…
As soon as I put the AHRS_ORIENTATION=4 the data image in mission planner moves as it should for roll axis and even i haven’t flown it, i can’t see any issues
The pitch axis is good in any case…

I have tried disabling IMU 2 and 3 but same issue, downgraded to 4.1.1 and same issue…
I am not sure why the board will think that, any help much appreciated

What am I missing?

Thank you in advance

PS: I am confident I doing the calibration routine correctly, since I’ve done it before (and check videos on youtube) and the fact that the AHRS_ORIENTATION change fixes it

Edit: QGroundControl Calibration has the same results

Any help on this?
Thanks in advance

If you have a fix, what is the problem?

These are the definitions in hwdef:
IMU Invensense SPI:icm20602 ROTATION_PITCH_180
IMU Invensense SPI:mpu6000 ROTATION_ROLL_180

@andyp1per thanks for the reply!
It wasn’t happening before the reset of settings…
And it should not happen… that’s the issue, I’d say it is a workaround more than a fix…

I am very new in Arduplane, what those hwdef should tell me?

@andyp1per any help please?

Its the way support is compiled in. I think you should just go with whatever AHRS_ORIENTATION works

okay, I understand, thank you @andyp1per

I have checked the 4.1.2 firmware on a MatekF765-Wing and the IMU orientations are correct

Thank you @tridge
that’s why I was asking and I think something is wrong… it used to work correct and it is a strange issue to say that gyro is bad, right?

It’s working correctly. The hardware orientation is per the hardware definition file referenced above. It’s possible that the orientation was auto-detected or otherwise set correctly without your specific knowledge or memory in the previous frame. Unless you’re having other errors, there is no issue.

@Yuri_Rage sorry for my late reply.
thank you for your reply… I have noticed that the AHRS_ORIENTATION = 4 makes the roll behave correctly but the pitch is incorrect…
I would like to change the roll banking behaviour only, what should be the ahrs_orientation value or the custom value?
At the moment, AHRS_ORIENTATION=0 and the roll is inverted, all other axis is fine, if choose AHRS_ORIENTATION=4 the pitch is inverted too and i get the wrong pitch and correct roll.

Can I do something about it?
Is the board faulty or what is the issue? i’m quite lost, i’ve been on and off for a week on this simple issue…

Original description may be misleading since it is not thinking it is yawed 180 anymore because did not notice pitch is wrong if i choose AHRS_ORIENTATION=4

Thank you in advance

My parameters, please check if something is wrong with them
parms_list.param (18.9 KB)
and a quick video:

The FC is rather not defective. If you have installed it with the arrow pointing forward, AHRS_ORIENTATION=0 is correct.

Your rudder setting is probably not correct. You should read this carefully and work through it step by step: Choosing Servo Functions — Plane documentation

Thank you @Target0815
I believe the AHRS_ORIENTATION should be 0 too…
I’ll review the Servo functions, but how is servo function related to the Accelerometer readings?


I had not seen the video, so you mean only the display in the HUD? The display is already correct when rolling. When the plane rolls to the left, the HUD moves to the right. Just imagine you are sitting in the plane …

This is correct then?
To be fair… the fbwa corrections work fine

If you turn the plane so that the nose points away from you, then it is more logical … :wink:

Also look at this example: (Roll reversed in HUD on Mission Planner)

Yes… you are totally right… @Target0815
I’m dumb! $hit, i’ve been long time on this haha
Really sorry

Thank you