Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAG_ENABLE fails to disable compass #5549

Closed
budebulai opened this issue Jan 12, 2017 · 8 comments
Closed

MAG_ENABLE fails to disable compass #5549

budebulai opened this issue Jan 12, 2017 · 8 comments

Comments

@budebulai
Copy link

Issue details

Using old version ardupilot firmware, we can use MAG_ENABLE to select if enabling compass, now it fails in 0a18f5e and others.
With new firmware, when setting MAG_ENABLE to 0, firmware skip compass init, but it will still check compass status when arming motors.
We can see there are three _state[i].use_for_yaw in parameters, if I choose not to use compass for vehicle heading, I have to set:
MAG_ENABLE = 0
_state[0].use_for_yaw = 0
_state[1].use_for_yaw = 0
_state[2].use_for_yaw = 0
ARMING_CHECK = -5
boring
So MAG_ENABLE means nothing now.

Version

0a18f5e

Platform

[ ] All

@OXINARF
Copy link
Member

OXINARF commented Jan 12, 2017

What firmware is this with? Plane, Copter, Rover?

@rmackay9
Copy link
Contributor

Yeah, I've been thinking about this MAG_ENABLE parameter on and off. I'm not surprised if we find out it's meaningless. When we added the COMPASS_USE parameters we probably didn't take the extra step to remove MAG_ENABLE.

@rmackay9
Copy link
Contributor

By the way, we have some related issues in our to-do list:
#5454
#5451

I guess the point is that it may or may not be possible to fly without a compass in AC3.4. I think you could try by setting all the COMPASS_USE parameters to zero, then disable the compass part of the ARMING_CHECK parameter and then see what happens :-). Certainly loiter won't work of course, but Stabilize, AltHold and ACRO should work.

@budebulai
Copy link
Author

Sorry, I made a mistake.
I forget what I've done to the code, now MP report "PreArm: Compass not healthy" even I set all compass params and arming_check to 0.
I have to check now
Sorry again

@budebulai
Copy link
Author

Thank you, @rmackay9
Copter 3.5 will stop pixhawk from being armed if compass disabled.
And I comment compass check, pixhawk armed

@rmackay9
Copy link
Contributor

My main sponsor brought this up today actually. They found it confusing that to arm and takeoff in stabilize mode (without a compass) they need to leave MAG_ENABLE = 1 and then set the COMPASS_USE, COMPASS_USE2 = 0.
I think we should remove the MAG_ENABLE parameter or move it into the COMPASS library.

@OXINARF
Copy link
Member

OXINARF commented Jun 28, 2017

@rmackay9 I completely agree that it is very confusing. In my opinion we should just remove it. If users don't want to use compass they disable it with the COMPASS_USE parameters. I think that adding a general compass enable parameter would also be confusing.

@rmackay9
Copy link
Contributor

rmackay9 commented Oct 1, 2019

This parameter MAG_ENABLE has been moved to COMPASS_ENABLE so I think I'll close this issue. Hopefully compass-enable does disable all compasses - I think it must.

@rmackay9 rmackay9 closed this as completed Oct 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants