ArduPilot / ArduPilot/ardupilot
Sub: Even if the baro is normal, MP still reports "Bad Baro Health" error.
- Dominant language
- C++
- Stars
- 15.9k
- Forks
- 21.4k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 119
Description
The MP has been reporting an error of "Bad Baro Health", but my baro is normal and the value is displayed normally, as shown in the following figure: [Bad Baro Health](https://drive.google.com/file/d/1dr5zwJtzijNrvFKg2EO3n7j7V7Cm_ibD/view)
I think i have already discovered the bug. [the two lines of code inside 'if'](https://github.com/ArduPilot/ardupilot/blob/Sub-4.1/ArduSub/GCS_Sub.cpp#L51) do not work because they have already been executed in [baro status](https://github.com/ArduPilot/ardupilot/blob/Sub-4.1/libraries/GCS_MAVLink/GCS.cpp#L164). At the same time, if i don't have a depth sensor, this error will continue to prompt because of this [if](https://github.com/ArduPilot/ardupilot/blob/Sub-4.1/ArduSub/GCS_Sub.cpp#L55).
**Version**
Sub-4.x
**Platform**
[ ] All
[ ] AntennaTracker
[ ] Copter
[ ] Plane
[ ] Rover
[ * ] Submarine
Contributor guide
Research direction
Start in ArduSub/GCS_Sub.cpp around lines 51-55 and compare its barometer-status handling with libraries/GCS_MAVLink/GCS.cpp around line 164. Reproduce the report on Sub-4.x with a normal barometer and no depth sensor, then trace why the health check still reports "Bad Baro Health." Done means a healthy barometer no longer produces the erroneous message in that setup, with relevant tests or verification run.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- robotics
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100