Be a bit quieter and more forgiving about various system configuration and driver non-issues.

This commit is contained in:
px4dev
2012-09-10 00:16:05 -07:00
parent a1b4d32b56
commit 68d4a26b9e
2 changed files with 8 additions and 15 deletions
+7 -14
View File
@@ -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);
} }
+1 -1
View File
@@ -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);
} }