mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 23:53:34 +08:00
ms5611 cleanup unnecessary Device CDev usage
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user