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

AP_Arming: Display mag field value #13166

Merged
merged 1 commit into from
Apr 21, 2020

Conversation

muramura
Copy link
Contributor

@muramura muramura commented Jan 4, 2020

I turned on the flight controller Durandal indoors.
I often see the message “PreArm: Check mag field” in Mission Planner, QgroundControl, and APM Planner2.
I put the same revision of AC4.0.1-dev in PIXRACER, PIXHAWK. I learned that this message did not appear.
I have found that it appears above 875 or below 185.
I think it is better to display the judgment value.
In this environment it is over 5000.
I checked this value while moving the aircraft.
I saw it change.

After message:
PreArm: Check mag field 5688.519

@rmackay9
Copy link
Contributor

rmackay9 commented Jan 7, 2020

Generally ok but let's make the format so that it doesn't show any decimal places ("%4.0f"?). I think we also need to cast "mag_field" with (double). So it should be, ".. (double)mag_field);" in order to avoid a compiler warning.

It would be nice to also show the acceptable range (I.e. "mag field 5688 > 875") but this isn't a hard requirement for this PR to go in. It's an improvement in any case.

Copy link
Contributor

@khancyr khancyr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to go

@rmackay9 rmackay9 merged commit 2af70f5 into ArduPilot:master Apr 21, 2020
@rmackay9
Copy link
Contributor

Merged, thanks!

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants