PX4 / PX4-Autopilot

PX4 Autopilot Software
https://px4.io
BSD 3-Clause "New" or "Revised" License
8.5k stars 13.51k forks source link

Defect in new MPU9250 driver breaks mpu6500 calibration process #14442

Closed airmind closed 4 years ago

airmind commented 4 years ago

Describe the bug The new MPU9250 driver (> v1.10.0) missed detection of '_whoami' flag for 9250 & 6500, thus registered a false mag device class path even for mpu6500 chip who actually does not have a mag component, and this false mag device then in turn messed up the devid list(in mag_calibration.cpp), and fail the logic in mag calibration part of code.

Previous version of driver has this detection but somehow been dropped in new implementation.

This issue potentially impacts all FCU with onboard mpu6500 sensor. These FCUs may not able to perform mag calibration in QGC.

Some revisions of MindPX hardware has on board mpu6500 sensor so these FCUs will be infected. MindRacer is lucky to be immune to this defect as the onboard 6500 driver is launched in last place which goes beyond the uORB counted sensor number.

To Reproduce Steps to reproduce the behavior:

  1. Use a MindPX FCU, or any other FCUs that uses 6500 sensor, just make sure 6500 driver is not the last one launched.
  2. connect to QGC and start a mag calibration.
  3. The calibration will fail.

Expected behavior mag calibration should complete without issue.

Log Files and Screenshots

WARN  [commander] Mag #1 (ID 263202) no matching uORB devid
WARN  [commander] [cal] calibration failed: mag

Pull request Pull request #14441 is to fix this issue. Please review it and see if good to merge.

Additional context Urgent help is needed, as some MindPX customers can not calibrate their FCU on upgrading to new firmware. @LorenzMeier @dagar @jinger26 can you pls help to fix the issue asap into 1.11 release? Thanks.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.

dagar commented 4 years ago

This has been resolved with the new Invensense drivers.