mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-22 00:30:35 +08:00
HMC5883: Increase the number of calibration cycles to ensure a stable result
This commit is contained in:
@@ -1124,8 +1124,8 @@ int HMC5883::calibrate(struct file *filp, unsigned enable)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* read the sensor up to 50x, stopping when we have 10 good values */
|
/* read the sensor up to 100x, stopping when we have 30 good values */
|
||||||
for (uint8_t i = 0; i < 50 && good_count < 10; i++) {
|
for (uint8_t i = 0; i < 100 && good_count < 30; i++) {
|
||||||
struct pollfd fds;
|
struct pollfd fds;
|
||||||
|
|
||||||
/* wait for data to be ready */
|
/* wait for data to be ready */
|
||||||
|
|||||||
Reference in New Issue
Block a user