CRIUS_LITE and CRIUS_SE

This forum is dedicated to software development related to MultiWii.
It is not the right place to submit a setup problem.
Software download
Post Reply
User avatar
Th0rsten
Posts: 65
Joined: Mon Oct 31, 2011 10:28 am

CRIUS_LITE and CRIUS_SE

Post by Th0rsten »

Hello!

In PRE2 there is an error in the CRIUS_LITE def. I corrected that - hoping it's ok now.
Tested it on my LITE - they seem to be ok.

BUT I do not own an SE so I removed the defs for the SE because they look wrong.
If there is anyone who can supply correct defs for the SE and PRE2 please tell me the correct ones.

http://code.google.com/p/multiwii/source/detail?r=619

Thorsten

Dellow
Posts: 26
Joined: Tue Dec 20, 2011 12:38 am

Re: CRIUS_LITE and CRIUS_SE

Post by Dellow »

Hi Thorsten,

I have a Crius SE, but have so far not been able to work out the correct configuration. All the numbers in the GUI look correct, but when you roll the board inverted the Mag heading flips 180°, and if you pitch the board inverted the heading stays the same. Should be the other way around.

If I had incorrect numbers in the GUI I could work out what needs changing, but as they are seemingly correct I'm stuck!

Hope someone comes up with a solution soon!

Andy

Dellow
Posts: 26
Joined: Tue Dec 20, 2011 12:38 am

Re: CRIUS_LITE and CRIUS_SE

Post by Dellow »

I've done a bit more digging, and the problem seems to occur in the code change from revision r555 to r607.
See http://code.google.com/p/multiwii/sourc ... ensors.pde

The orientation of Acc, Gyro and Mag have changed in sensors.pde, with a subsequent change in def.h but the two don't seem to tie up.
My knowledge of coding isn't good enough to work out what's going on, but if someone can explain what this section actually relates to in terms of X, Y, Z I'll try to work out a solution.

Thanks for any help
Andy

User avatar
Th0rsten
Posts: 65
Joined: Mon Oct 31, 2011 10:28 am

Re: CRIUS_LITE and CRIUS_SE

Post by Th0rsten »

Committed a slightly changed DEF of CRIUS_SE a few minutes ago.
Please test:

#define ACC_ORIENTATION(X, Y, Z) {accADC[ROLL] = -X; accADC[PITCH] = -Y; accADC[YAW] = Z;}
#define GYRO_ORIENTATION(X, Y, Z) {gyroADC[ROLL] = Y; gyroADC[PITCH] = -X; gyroADC[YAW] = -Z;}
#define MAG_ORIENTATION(X, Y, Z) {magADC[ROLL] = X; magADC[PITCH] = Y; magADC[YAW] = Z;}

Dellow
Posts: 26
Joined: Tue Dec 20, 2011 12:38 am

Re: CRIUS_LITE and CRIUS_SE

Post by Dellow »

Duly tested! Again, all sensors appear to give the correct readings in the GUI as far as positive / negative deflection, but when the board is rotated to a point approaching 90° the opposite axis flips. i.e. If the board is rolled right to a point approaching 90°, the pitch axis will suddenly flip 180° and vice versa. This means that the mag is then showing the heading incorrectly.

At the point that it flips, the x, y, and z numbers remain fairly constant.
Maybe it is my board, although I can get good results with 1.8 and 1.9. For this to work consistently I have to undefine 'Use Trusted Acc' even though the board is not mounted in a quad, so I'm coming to the conclusion that perhaps the accelerometer or mag are faulty.

Thanks for your time looking in to this.
Andy

Post Reply