ms5611 cleanup unnecessary Device CDev usage

This commit is contained in:
Daniel Agar
2018-08-27 13:14:15 -04:00
parent 1a5ffb3173
commit 9b2274ea8d
2 changed files with 17 additions and 27 deletions
+6 -6
View File
@@ -149,7 +149,7 @@ MS5611_SPI::init()
ret = SPI::init();
if (ret != OK) {
DEVICE_DEBUG("SPI init failed");
PX4_DEBUG("SPI init failed");
goto out;
}
@@ -157,7 +157,7 @@ MS5611_SPI::init()
ret = _reset();
if (ret != OK) {
DEVICE_DEBUG("reset failed");
PX4_DEBUG("reset failed");
goto out;
}
@@ -165,7 +165,7 @@ MS5611_SPI::init()
ret = _read_prom();
if (ret != OK) {
DEVICE_DEBUG("prom readout failed");
PX4_DEBUG("prom readout failed");
goto out;
}
@@ -261,18 +261,18 @@ MS5611_SPI::_read_prom()
all_zero = false;
}
//DEVICE_DEBUG("prom[%u]=0x%x", (unsigned)i, (unsigned)_prom.c[i]);
//PX4_DEBUG("prom[%u]=0x%x", (unsigned)i, (unsigned)_prom.c[i]);
}
/* calculate CRC and return success/failure accordingly */
int ret = ms5611::crc4(&_prom.c[0]) ? OK : -EIO;
if (ret != OK) {
DEVICE_DEBUG("crc failed");
PX4_DEBUG("crc failed");
}
if (all_zero) {
DEVICE_DEBUG("prom all zero");
PX4_DEBUG("prom all zero");
ret = -EIO;
}