diff options
author | px4dev <px4@purgatory.org> | 2012-09-10 00:16:05 -0700 |
---|---|---|
committer | px4dev <px4@purgatory.org> | 2012-09-10 00:16:05 -0700 |
commit | 68d4a26b9ead5a042edb14dd5c038df2908ea7fe (patch) | |
tree | 99db4fd50913ee30d54e02fabeb565b96786bb6c /apps | |
parent | a1b4d32b56d10cbfd74db97d8df97df3ff616dc1 (diff) | |
download | px4-firmware-68d4a26b9ead5a042edb14dd5c038df2908ea7fe.tar.gz px4-firmware-68d4a26b9ead5a042edb14dd5c038df2908ea7fe.tar.bz2 px4-firmware-68d4a26b9ead5a042edb14dd5c038df2908ea7fe.zip |
Be a bit quieter and more forgiving about various system configuration and driver non-issues.
Diffstat (limited to 'apps')
-rw-r--r-- | apps/sensors/sensors.cpp | 21 | ||||
-rw-r--r-- | apps/systemcmds/boardinfo/boardinfo.c | 2 |
2 files changed, 8 insertions, 15 deletions
diff --git a/apps/sensors/sensors.cpp b/apps/sensors/sensors.cpp index 963c54b8e..d388a6d5a 100644 --- a/apps/sensors/sensors.cpp +++ b/apps/sensors/sensors.cpp @@ -533,12 +533,10 @@ Sensors::accel_init() warnx("using BMA180"); } else { /* set the accel internal sampling rate up to at leat 500Hz */ - if (OK != ioctl(fd, ACCELIOCSSAMPLERATE, 500)) - warn("WARNING: failed to set minimum 500Hz sample rate for accel"); + ioctl(fd, ACCELIOCSSAMPLERATE, 500); /* set the driver to poll at 500Hz */ - if (OK != ioctl(fd, SENSORIOCSPOLLRATE, 500)) - warn("WARNING: failed to set 500Hz poll rate for accel"); + ioctl(fd, SENSORIOCSPOLLRATE, 500); warnx("using system accel"); close(fd); @@ -568,12 +566,10 @@ Sensors::gyro_init() warn("using L3GD20"); } else { /* set the gyro internal sampling rate up to at leat 500Hz */ - if (OK != ioctl(fd, GYROIOCSSAMPLERATE, 500)) - warn("WARNING: failed to set minimum 500Hz sample rate for gyro"); + ioctl(fd, GYROIOCSSAMPLERATE, 500); /* set the driver to poll at 500Hz */ - if (OK != ioctl(fd, SENSORIOCSPOLLRATE, 500)) - warn("WARNING: failed to set 500Hz poll rate for gyro"); + ioctl(fd, SENSORIOCSPOLLRATE, 500); warnx("using system gyro"); close(fd); @@ -592,12 +588,10 @@ Sensors::mag_init() } /* set the mag internal poll rate to at least 150Hz */ - if (OK != ioctl(fd, MAGIOCSSAMPLERATE, 150)) - warn("WARNING: failed to set minimum 150Hz sample rate for mag"); + ioctl(fd, MAGIOCSSAMPLERATE, 150); /* set the driver to poll at 150Hz */ - if (OK != ioctl(fd, SENSORIOCSPOLLRATE, 150)) - warn("WARNING: failed to set 150Hz poll rate for mag"); + ioctl(fd, SENSORIOCSPOLLRATE, 150); close(fd); } @@ -614,8 +608,7 @@ Sensors::baro_init() } /* set the driver to poll at 150Hz */ - if (OK != ioctl(fd, SENSORIOCSPOLLRATE, 150)) - warn("WARNING: failed to set 150Hz poll rate for baro"); + ioctl(fd, SENSORIOCSPOLLRATE, 150); close(fd); } diff --git a/apps/systemcmds/boardinfo/boardinfo.c b/apps/systemcmds/boardinfo/boardinfo.c index 0ae0ee8d2..bce8c27e7 100644 --- a/apps/systemcmds/boardinfo/boardinfo.c +++ b/apps/systemcmds/boardinfo/boardinfo.c @@ -247,7 +247,7 @@ int boardinfo_main(int argc, char *argv[]) int ret = carrier_get_board_info(&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); } |