coby7016 / arducopter

Automatically exported from code.google.com/p/arducopter
0 stars 0 forks source link

Disabling compass in CLI does not reset values cortrectly. #196

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Arducoper ACM 2.0.25

With compass enabled try disabling with "Compass off" in CLI.
The result of the compass offsets show 0, 0, -163,44(or similar value)
If you re-enable comapss the offset remains 0,0,-163,44 thus not giving the 
ability to reset the values completely.

Modifying the function:

void clear_offsets()
{
    Vector3f _offsets;
    compass.set_offsets(_offsets);
    compass.save_offsets();
}

in

void clear_offsets()
{
    Vector3f _offsets(0.0,0.0,0.0);
    compass.set_offsets(_offsets);
    compass.save_offsets();
}

Solves the issue.

Original issue reported on code.google.com by emile.ca...@gmail.com on 20 Jun 2011 at 10:22

GoogleCodeExporter commented 9 years ago
I think the problem can be solved by solving issue no. 197. 
There is an error in the vector3f declaration. (vector3.h)

E.

Original comment by emile.ca...@gmail.com on 20 Jun 2011 at 10:26

GoogleCodeExporter commented 9 years ago
got it thanks!

Original comment by jasonshort on 20 Jun 2011 at 4:29