mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-07 03:21:36 +08:00
debugging ms5611 on spi2
This commit is contained in:
committed by
Lorenz Meier
parent
32626b57a4
commit
4952d05652
@@ -149,6 +149,7 @@ MS5611_SPI::init()
|
||||
|
||||
if (ret != OK) {
|
||||
DEVICE_DEBUG("SPI init failed");
|
||||
warnx("SPI::init failed");
|
||||
goto out;
|
||||
}
|
||||
|
||||
@@ -157,6 +158,7 @@ MS5611_SPI::init()
|
||||
|
||||
if (ret != OK) {
|
||||
DEVICE_DEBUG("reset failed");
|
||||
warnx("SPI::reset failed");
|
||||
goto out;
|
||||
}
|
||||
|
||||
@@ -165,6 +167,7 @@ MS5611_SPI::init()
|
||||
|
||||
if (ret != OK) {
|
||||
DEVICE_DEBUG("prom readout failed");
|
||||
warnx("SPI::prom readout failed");
|
||||
goto out;
|
||||
}
|
||||
|
||||
@@ -261,6 +264,7 @@ MS5611_SPI::_read_prom()
|
||||
}
|
||||
|
||||
//DEVICE_DEBUG("prom[%u]=0x%x", (unsigned)i, (unsigned)_prom.c[i]);
|
||||
warnx("prom[%u]=0x%x", (unsigned)i, (unsigned)_prom.c[i]);
|
||||
}
|
||||
|
||||
/* calculate CRC and return success/failure accordingly */
|
||||
@@ -268,10 +272,12 @@ MS5611_SPI::_read_prom()
|
||||
|
||||
if (ret != OK) {
|
||||
DEVICE_DEBUG("crc failed");
|
||||
warnx("crc failed");
|
||||
}
|
||||
|
||||
if (all_zero) {
|
||||
DEVICE_DEBUG("prom all zero");
|
||||
warnx("prom all zero");
|
||||
ret = -EIO;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user