mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
Reset MS5611 baro sensor after an error
Reset MS5611 baro sensor after an error in order to avoid endless error loops
This commit is contained in:
parent
5e9639ad9b
commit
2de01964e2
@ -526,6 +526,7 @@ void
|
||||
MS5611::cycle()
|
||||
{
|
||||
int ret;
|
||||
unsigned dummy;
|
||||
|
||||
/* collection phase? */
|
||||
if (_collect_phase) {
|
||||
@ -542,6 +543,8 @@ MS5611::cycle()
|
||||
} else {
|
||||
//log("collection error %d", ret);
|
||||
}
|
||||
/* issue a reset command to the sensor */
|
||||
_interface->ioctl(IOCTL_RESET, dummy);
|
||||
/* reset the collection state machine and try again */
|
||||
start_cycle();
|
||||
return;
|
||||
@ -573,6 +576,8 @@ MS5611::cycle()
|
||||
ret = measure();
|
||||
if (ret != OK) {
|
||||
//log("measure error %d", ret);
|
||||
/* issue a reset command to the sensor */
|
||||
_interface->ioctl(IOCTL_RESET, dummy);
|
||||
/* reset the collection state machine and try again */
|
||||
start_cycle();
|
||||
return;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user