aboutsummaryrefslogtreecommitdiff
path: root/src/drivers/ms5611/ms5611.cpp
diff options
context:
space:
mode:
authorLorenz Meier <lm@inf.ethz.ch>2014-05-29 11:26:18 +0200
committerLorenz Meier <lm@inf.ethz.ch>2014-05-29 11:26:18 +0200
commit6341737384b5bf39ee664c924ee930b875aa19ab (patch)
treed3ab6db7962a5d7f5c3eda4f5319df7060477d8d /src/drivers/ms5611/ms5611.cpp
parentaf1af1e22ddd4bcd55fe9eaaf98f4a640329a4c7 (diff)
parent83edab4d593b2cb92dae713d705255aeca4b3040 (diff)
downloadpx4-firmware-6341737384b5bf39ee664c924ee930b875aa19ab.tar.gz
px4-firmware-6341737384b5bf39ee664c924ee930b875aa19ab.tar.bz2
px4-firmware-6341737384b5bf39ee664c924ee930b875aa19ab.zip
Merge branch 'master' of github.com:PX4/Firmware into pca8574
Diffstat (limited to 'src/drivers/ms5611/ms5611.cpp')
-rw-r--r--src/drivers/ms5611/ms5611.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/drivers/ms5611/ms5611.cpp b/src/drivers/ms5611/ms5611.cpp
index 0ef056273..1ce93aeea 100644
--- a/src/drivers/ms5611/ms5611.cpp
+++ b/src/drivers/ms5611/ms5611.cpp
@@ -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;
@@ -748,8 +753,8 @@ MS5611::print_info()
printf("TEMP: %d\n", _TEMP);
printf("SENS: %lld\n", _SENS);
printf("OFF: %lld\n", _OFF);
- printf("P: %.3f\n", _P);
- printf("T: %.3f\n", _T);
+ printf("P: %.3f\n", (double)_P);
+ printf("T: %.3f\n", (double)_T);
printf("MSL pressure: %10.4f\n", (double)(_msl_pressure / 100.f));
printf("factory_setup %u\n", _prom.factory_setup);