|
|
@ -526,6 +526,7 @@ void |
|
|
|
MS5611::cycle() |
|
|
|
MS5611::cycle() |
|
|
|
{ |
|
|
|
{ |
|
|
|
int ret; |
|
|
|
int ret; |
|
|
|
|
|
|
|
unsigned dummy; |
|
|
|
|
|
|
|
|
|
|
|
/* collection phase? */ |
|
|
|
/* collection phase? */ |
|
|
|
if (_collect_phase) { |
|
|
|
if (_collect_phase) { |
|
|
@ -542,6 +543,8 @@ MS5611::cycle() |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
//log("collection error %d", ret);
|
|
|
|
//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 */ |
|
|
|
/* reset the collection state machine and try again */ |
|
|
|
start_cycle(); |
|
|
|
start_cycle(); |
|
|
|
return; |
|
|
|
return; |
|
|
@ -573,6 +576,8 @@ MS5611::cycle() |
|
|
|
ret = measure(); |
|
|
|
ret = measure(); |
|
|
|
if (ret != OK) { |
|
|
|
if (ret != OK) { |
|
|
|
//log("measure error %d", ret);
|
|
|
|
//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 */ |
|
|
|
/* reset the collection state machine and try again */ |
|
|
|
start_cycle(); |
|
|
|
start_cycle(); |
|
|
|
return; |
|
|
|
return; |
|
|
|