forked from Archive/PX4-Autopilot
Add setting queue depth to HMC test
This commit is contained in:
parent
751c026469
commit
98ac914cb0
|
@ -1317,6 +1317,10 @@ test()
|
||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
err(1, "%s open failed (try 'hmc5883 start' if the driver is not running", MAG_DEVICE_PATH);
|
err(1, "%s open failed (try 'hmc5883 start' if the driver is not running", MAG_DEVICE_PATH);
|
||||||
|
|
||||||
|
/* set the queue depth to 10 */
|
||||||
|
if (OK != ioctl(fd, SENSORIOCSQUEUEDEPTH, 10))
|
||||||
|
errx(1, "failed to set queue depth");
|
||||||
|
|
||||||
/* do a simple demand read */
|
/* do a simple demand read */
|
||||||
sz = read(fd, &report, sizeof(report));
|
sz = read(fd, &report, sizeof(report));
|
||||||
|
|
||||||
|
@ -1332,7 +1336,7 @@ test()
|
||||||
errx(1, "failed to get if mag is onboard or external");
|
errx(1, "failed to get if mag is onboard or external");
|
||||||
warnx("device active: %s", ret ? "external" : "onboard");
|
warnx("device active: %s", ret ? "external" : "onboard");
|
||||||
|
|
||||||
/* set the queue depth to 10 */
|
/* set the queue depth to 5 */
|
||||||
if (OK != ioctl(fd, SENSORIOCSQUEUEDEPTH, 10))
|
if (OK != ioctl(fd, SENSORIOCSQUEUEDEPTH, 10))
|
||||||
errx(1, "failed to set queue depth");
|
errx(1, "failed to set queue depth");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue