mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-28 15:53:34 +08:00
Fixed altitude jump issue, hunted down and fix by Andrew Tridgell.
This commit is contained in:
@@ -331,8 +331,9 @@ MS5611::probe()
|
|||||||
|
|
||||||
if ((OK == probe_address(MS5611_ADDRESS_1)) ||
|
if ((OK == probe_address(MS5611_ADDRESS_1)) ||
|
||||||
(OK == probe_address(MS5611_ADDRESS_2))) {
|
(OK == probe_address(MS5611_ADDRESS_2))) {
|
||||||
/*
|
/*
|
||||||
* Disable retries; the device gets confused if we retry some of the commands.
|
* Disable retries; we may enable them selectively in some cases,
|
||||||
|
* but the device gets confused if we retry some of the commands.
|
||||||
*/
|
*/
|
||||||
_retries = 0;
|
_retries = 0;
|
||||||
return OK;
|
return OK;
|
||||||
@@ -653,7 +654,11 @@ MS5611::measure()
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Send the command to begin measuring.
|
* Send the command to begin measuring.
|
||||||
|
*
|
||||||
|
* Disable retries on this command; we can't know whether failure
|
||||||
|
* means the device did or did not see the write.
|
||||||
*/
|
*/
|
||||||
|
_retries = 0;
|
||||||
ret = transfer(&cmd_data, 1, nullptr, 0);
|
ret = transfer(&cmd_data, 1, nullptr, 0);
|
||||||
|
|
||||||
if (OK != ret)
|
if (OK != ret)
|
||||||
|
|||||||
Reference in New Issue
Block a user