mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 06:43:35 +08:00
clean up, change SPI2 clock back to 12MHz and remove debug prints
This commit is contained in:
committed by
Lorenz Meier
parent
ab71af6053
commit
ecbcfe838b
@@ -902,8 +902,6 @@ crc4(uint16_t *n_prom)
|
||||
bool
|
||||
start_bus(struct ms5611_bus_option &bus)
|
||||
{
|
||||
warnx("start_bus id %u", (unsigned)bus.busid);
|
||||
|
||||
if (bus.dev != nullptr) {
|
||||
errx(1, "bus option already started");
|
||||
}
|
||||
@@ -911,8 +909,6 @@ start_bus(struct ms5611_bus_option &bus)
|
||||
prom_u prom_buf;
|
||||
device::Device *interface = bus.interface_constructor(prom_buf, bus.busnum);
|
||||
|
||||
warnx("init ms5611 on bus id %u", (unsigned)bus.busid);
|
||||
|
||||
if (interface->init() != OK) {
|
||||
delete interface;
|
||||
warnx("no device on bus %u", (unsigned)bus.busid);
|
||||
@@ -927,8 +923,6 @@ start_bus(struct ms5611_bus_option &bus)
|
||||
return false;
|
||||
}
|
||||
|
||||
warnx("open ms5611 on bus %u", (unsigned)bus.busid);
|
||||
|
||||
int fd = open(bus.devpath, O_RDONLY);
|
||||
|
||||
/* set the poll rate to default, starts automatic data collection */
|
||||
|
||||
@@ -149,7 +149,6 @@ MS5611_SPI::init()
|
||||
|
||||
if (ret != OK) {
|
||||
DEVICE_DEBUG("SPI init failed");
|
||||
warnx("SPI::init failed");
|
||||
goto out;
|
||||
}
|
||||
|
||||
@@ -158,7 +157,6 @@ MS5611_SPI::init()
|
||||
|
||||
if (ret != OK) {
|
||||
DEVICE_DEBUG("reset failed");
|
||||
warnx("SPI::reset failed");
|
||||
goto out;
|
||||
}
|
||||
|
||||
@@ -167,7 +165,6 @@ MS5611_SPI::init()
|
||||
|
||||
if (ret != OK) {
|
||||
DEVICE_DEBUG("prom readout failed");
|
||||
warnx("SPI::prom readout failed");
|
||||
goto out;
|
||||
}
|
||||
|
||||
@@ -264,7 +261,6 @@ 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 */
|
||||
@@ -272,12 +268,10 @@ 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