Skip to content

AP_Baro: Fix BMP581 abnormal health problem#33111

Open
ZeroOne-Aero wants to merge 2 commits into
ArduPilot:masterfrom
ZeroOne-Aero:pr-BMP581-260519
Open

AP_Baro: Fix BMP581 abnormal health problem#33111
ZeroOne-Aero wants to merge 2 commits into
ArduPilot:masterfrom
ZeroOne-Aero:pr-BMP581-260519

Conversation

@ZeroOne-Aero
Copy link
Copy Markdown
Contributor

This is a previous issue. #32171
When trying to use the BMP581 on the ZeroOne X6 Air's I2C0, I also encountered bus interference. Sensor data was normal, but the Log's Health was abnormal.
BMP581
The main problem was that data wasn't refreshed for over 500ms.
BMP581-02
This issue was resolved by comparing and reading the sensor data again; currently, all tests are normal now.

Copy link
Copy Markdown
Contributor

@peterbarker peterbarker left a comment

Choose a reason for hiding this comment

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

500ms is a long time to go without data. Any idea how this PR actually fixes the problem?!

}
if (memcmp(buf, buf2, ARRAY_SIZE(buf)) != 0) {
// still inconsistent; use first reading anyway
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If you truly want to compare against the first sample again here - use a for here instead.

... but it seems strange assuming your first sample is the good one.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I suspect data loss occurred when the two comparisons were different, so I'm performing another comparison after the second read. Since I don't fully understand the previous issue, was the second buffer introduced because of the exception during the first read?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It seems a bit unreliable to use the first sample directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants