mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-28 02:36:37 +08:00
Merge pull request #380 from julianoes/hotfix_mag_calib
Workaround to prevent crash during mag calibration
This commit is contained in:
@@ -962,11 +962,12 @@ int HMC5883::calibrate(struct file *filp, unsigned enable)
|
|||||||
warnx("sampling 500 samples for scaling offset");
|
warnx("sampling 500 samples for scaling offset");
|
||||||
|
|
||||||
/* set the queue depth to 10 */
|
/* set the queue depth to 10 */
|
||||||
if (OK != ioctl(filp, SENSORIOCSQUEUEDEPTH, 10)) {
|
/* don't do this for now, it can lead to a crash in start() respectively work_queue() */
|
||||||
warn("failed to set queue depth");
|
// if (OK != ioctl(filp, SENSORIOCSQUEUEDEPTH, 10)) {
|
||||||
ret = 1;
|
// warn("failed to set queue depth");
|
||||||
goto out;
|
// ret = 1;
|
||||||
}
|
// goto out;
|
||||||
|
// }
|
||||||
|
|
||||||
/* start the sensor polling at 50 Hz */
|
/* start the sensor polling at 50 Hz */
|
||||||
if (OK != ioctl(filp, SENSORIOCSPOLLRATE, 50)) {
|
if (OK != ioctl(filp, SENSORIOCSPOLLRATE, 50)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user