diff options
author | Andrew Tridgell <andrew@tridgell.net> | 2015-02-11 16:22:31 +1100 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2015-02-11 12:48:52 +0100 |
commit | e0ac0c4a4b83fe0ba55557fe77913e9891bb0a57 (patch) | |
tree | c27cc3af0bdbffae8e8f8ad0cb73bc118fbe490a /src/drivers/l3gd20 | |
parent | fc40a5c64155a828bc070c815c61ad7f7244fb5d (diff) | |
download | px4-firmware-e0ac0c4a4b83fe0ba55557fe77913e9891bb0a57.tar.gz px4-firmware-e0ac0c4a4b83fe0ba55557fe77913e9891bb0a57.tar.bz2 px4-firmware-e0ac0c4a4b83fe0ba55557fe77913e9891bb0a57.zip |
l3gd20: fixed "l3gd20 test"
don't reset after test, and leave us in correct polling mode
Diffstat (limited to 'src/drivers/l3gd20')
-rw-r--r-- | src/drivers/l3gd20/l3gd20.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/drivers/l3gd20/l3gd20.cpp b/src/drivers/l3gd20/l3gd20.cpp index 304b5657d..9fee1a2b0 100644 --- a/src/drivers/l3gd20/l3gd20.cpp +++ b/src/drivers/l3gd20/l3gd20.cpp @@ -1234,11 +1234,12 @@ test() warnx("gyro range: %8.4f rad/s (%d deg/s)", (double)g_report.range_rad_s, (int)((g_report.range_rad_s / M_PI_F) * 180.0f + 0.5f)); + if (ioctl(fd_gyro, SENSORIOCSPOLLRATE, SENSOR_POLLRATE_DEFAULT) < 0) + err(1, "reset to default polling"); + close(fd_gyro); /* XXX add poll-rate tests here too */ - - reset(); errx(0, "PASS"); } |