forked from Archive/PX4-Autopilot
Fixed missing reset of poll rate after test exit in ultrasound driver
This commit is contained in:
parent
3f3abebf68
commit
290b07920c
|
@ -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");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue