Fixed missing reset of poll rate after test exit in ultrasound driver

This commit is contained in:
Lorenz Meier 2014-03-11 10:52:26 +01:00
parent 3f3abebf68
commit 290b07920c
1 changed files with 6 additions and 1 deletions

View File

@ -200,7 +200,7 @@ MB12XX::MB12XX(int bus, int address) :
_buffer_overflows(perf_alloc(PC_COUNT, "mb12xx_buffer_overflows"))
{
// enable debug() calls
_debug_enabled = true;
_debug_enabled = false;
// work_cancel in the dtor will explode if we don't do this...
memset(&_work, 0, sizeof(_work));
@ -762,6 +762,11 @@ test()
warnx("time: %lld", report.timestamp);
}
/* reset the sensor polling to default rate */
if (OK != ioctl(fd, SENSORIOCSPOLLRATE, SENSOR_POLLRATE_DEFAULT)) {
errx(1, "failed to set default poll rate");
}
errx(0, "PASS");
}