mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-04 09:30:35 +08:00
l3gd20: fixed "l3gd20 test"
don't reset after test, and leave us in correct polling mode
This commit is contained in:
committed by
Lorenz Meier
parent
fc40a5c641
commit
e0ac0c4a4b
@@ -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");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user