diff options
Diffstat (limited to 'apps/px4')
-rw-r--r-- | apps/px4/tests/test_sensors.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/px4/tests/test_sensors.c b/apps/px4/tests/test_sensors.c index dc1f39046..14503276c 100644 --- a/apps/px4/tests/test_sensors.c +++ b/apps/px4/tests/test_sensors.c @@ -125,7 +125,7 @@ accel(int argc, char *argv[]) /* read data - expect samples */ ret = read(fd, &buf, sizeof(buf)); - if (ret < 3) { + if (ret != sizeof(buf)) { printf("\tACCEL: read1 fail (%d)\n", ret); return ERROR; @@ -177,7 +177,7 @@ gyro(int argc, char *argv[]) /* read data - expect samples */ ret = read(fd, &buf, sizeof(buf)); - if (ret < 3) { + if (ret != sizeof(buf)) { printf("\tGYRO: read fail (%d)\n", ret); return ERROR; @@ -214,7 +214,7 @@ mag(int argc, char *argv[]) /* read data - expect samples */ ret = read(fd, &buf, sizeof(buf)); - if (ret < 3) { + if (ret != sizeof(buf)) { printf("\tMAG: read fail (%d)\n", ret); return ERROR; @@ -251,7 +251,7 @@ baro(int argc, char *argv[]) /* read data - expect samples */ ret = read(fd, &buf, sizeof(buf)); - if (ret < 3) { + if (ret != sizeof(buf)) { printf("\tBARO: read fail (%d)\n", ret); return ERROR; |