mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-28 07:03:34 +08:00
Be a bit quieter and more forgiving about various system configuration and driver non-issues.
This commit is contained in:
@@ -533,12 +533,10 @@ Sensors::accel_init()
|
|||||||
warnx("using BMA180");
|
warnx("using BMA180");
|
||||||
} else {
|
} else {
|
||||||
/* set the accel internal sampling rate up to at leat 500Hz */
|
/* set the accel internal sampling rate up to at leat 500Hz */
|
||||||
if (OK != ioctl(fd, ACCELIOCSSAMPLERATE, 500))
|
ioctl(fd, ACCELIOCSSAMPLERATE, 500);
|
||||||
warn("WARNING: failed to set minimum 500Hz sample rate for accel");
|
|
||||||
|
|
||||||
/* set the driver to poll at 500Hz */
|
/* set the driver to poll at 500Hz */
|
||||||
if (OK != ioctl(fd, SENSORIOCSPOLLRATE, 500))
|
ioctl(fd, SENSORIOCSPOLLRATE, 500);
|
||||||
warn("WARNING: failed to set 500Hz poll rate for accel");
|
|
||||||
|
|
||||||
warnx("using system accel");
|
warnx("using system accel");
|
||||||
close(fd);
|
close(fd);
|
||||||
@@ -568,12 +566,10 @@ Sensors::gyro_init()
|
|||||||
warn("using L3GD20");
|
warn("using L3GD20");
|
||||||
} else {
|
} else {
|
||||||
/* set the gyro internal sampling rate up to at leat 500Hz */
|
/* set the gyro internal sampling rate up to at leat 500Hz */
|
||||||
if (OK != ioctl(fd, GYROIOCSSAMPLERATE, 500))
|
ioctl(fd, GYROIOCSSAMPLERATE, 500);
|
||||||
warn("WARNING: failed to set minimum 500Hz sample rate for gyro");
|
|
||||||
|
|
||||||
/* set the driver to poll at 500Hz */
|
/* set the driver to poll at 500Hz */
|
||||||
if (OK != ioctl(fd, SENSORIOCSPOLLRATE, 500))
|
ioctl(fd, SENSORIOCSPOLLRATE, 500);
|
||||||
warn("WARNING: failed to set 500Hz poll rate for gyro");
|
|
||||||
|
|
||||||
warnx("using system gyro");
|
warnx("using system gyro");
|
||||||
close(fd);
|
close(fd);
|
||||||
@@ -592,12 +588,10 @@ Sensors::mag_init()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* set the mag internal poll rate to at least 150Hz */
|
/* set the mag internal poll rate to at least 150Hz */
|
||||||
if (OK != ioctl(fd, MAGIOCSSAMPLERATE, 150))
|
ioctl(fd, MAGIOCSSAMPLERATE, 150);
|
||||||
warn("WARNING: failed to set minimum 150Hz sample rate for mag");
|
|
||||||
|
|
||||||
/* set the driver to poll at 150Hz */
|
/* set the driver to poll at 150Hz */
|
||||||
if (OK != ioctl(fd, SENSORIOCSPOLLRATE, 150))
|
ioctl(fd, SENSORIOCSPOLLRATE, 150);
|
||||||
warn("WARNING: failed to set 150Hz poll rate for mag");
|
|
||||||
|
|
||||||
close(fd);
|
close(fd);
|
||||||
}
|
}
|
||||||
@@ -614,8 +608,7 @@ Sensors::baro_init()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* set the driver to poll at 150Hz */
|
/* set the driver to poll at 150Hz */
|
||||||
if (OK != ioctl(fd, SENSORIOCSPOLLRATE, 150))
|
ioctl(fd, SENSORIOCSPOLLRATE, 150);
|
||||||
warn("WARNING: failed to set 150Hz poll rate for baro");
|
|
||||||
|
|
||||||
close(fd);
|
close(fd);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -247,7 +247,7 @@ int boardinfo_main(int argc, char *argv[])
|
|||||||
int ret = carrier_get_board_info(&info);
|
int ret = carrier_get_board_info(&info);
|
||||||
|
|
||||||
if (ret != sizeof(info)) {
|
if (ret != sizeof(info)) {
|
||||||
fprintf(stderr, "[boardinfo] ERROR loading board info from EEPROM (errno #%d), aborting\n", -ret);
|
fprintf(stderr, "[boardinfo] no EEPROM for board %d\n", test_boardid);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user