diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2012-08-22 16:20:05 +0200 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2012-08-22 16:20:05 +0200 |
commit | 5f259e41d563a786777785072306ca5b5763ec79 (patch) | |
tree | 2beb2e22c2aa8462f51e3dd998fdc322a77fd789 /apps/px4/tests | |
parent | fa9f145b08cace0f48c808cf307daf6cd43d9bd6 (diff) | |
parent | 1530aeccae706fe8024b4de2293060539c01ceaa (diff) | |
download | px4-firmware-5f259e41d563a786777785072306ca5b5763ec79.tar.gz px4-firmware-5f259e41d563a786777785072306ca5b5763ec79.tar.bz2 px4-firmware-5f259e41d563a786777785072306ca5b5763ec79.zip |
Sensor readout, testing and driver adjustments
Diffstat (limited to 'apps/px4/tests')
-rw-r--r-- | apps/px4/tests/Makefile | 2 | ||||
-rw-r--r-- | apps/px4/tests/test_sensors.c | 13 |
2 files changed, 9 insertions, 6 deletions
diff --git a/apps/px4/tests/Makefile b/apps/px4/tests/Makefile index ad8849454..cb1c3c618 100644 --- a/apps/px4/tests/Makefile +++ b/apps/px4/tests/Makefile @@ -37,6 +37,6 @@ APPNAME = tests PRIORITY = SCHED_PRIORITY_DEFAULT -STACKSIZE = 8096 +STACKSIZE = 12000 include $(APPDIR)/mk/app.mk diff --git a/apps/px4/tests/test_sensors.c b/apps/px4/tests/test_sensors.c index 91397d11c..87ea7f058 100644 --- a/apps/px4/tests/test_sensors.c +++ b/apps/px4/tests/test_sensors.c @@ -90,11 +90,11 @@ struct { const char *path; int (* test)(int argc, char *argv[]); } sensors[] = { - {"l3gd20", "/dev/l3gd20", l3gd20}, {"bma180", "/dev/bma180", bma180}, + {"mpu6000", "/dev/accel", mpu6000}, + {"l3gd20", "/dev/l3gd20", l3gd20}, {"hmc5883l", "/dev/hmc5883l", hmc5883l}, {"ms5611", "/dev/ms5611", ms5611}, - {"mpu6000", "/dev/accel", mpu6000}, // {"lis331", "/dev/lis331", lis331}, {NULL, NULL, NULL} }; @@ -253,6 +253,9 @@ l3gd20(int argc, char *argv[]) static int bma180(int argc, char *argv[]) { + // XXX THIS SENSOR IS OBSOLETE + // TEST REMAINS, BUT ALWAYS RETURNS OK + printf("\tBMA180: test start\n"); fflush(stdout); @@ -264,7 +267,7 @@ bma180(int argc, char *argv[]) if (fd < 0) { printf("\tBMA180: open fail\n"); - return ERROR; + return OK; } // if (ioctl(fd, LIS331_SETRATE, LIS331_RATE_50Hz) || @@ -283,7 +286,7 @@ bma180(int argc, char *argv[]) if (ret != sizeof(buf)) { printf("\tBMA180: read1 fail (%d)\n", ret); close(fd); - return ERROR; + return OK; } else { printf("\tBMA180 values: x:%d\ty:%d\tz:%d\n", buf[0], buf[1], buf[2]); @@ -297,7 +300,7 @@ bma180(int argc, char *argv[]) if (ret != sizeof(buf)) { printf("\tBMA180: read2 fail (%d)\n", ret); close(fd); - return ERROR; + return OK; } else { printf("\tBMA180: x:%d\ty:%d\tz:%d\n", buf[0], buf[1], buf[2]); |