forked from ArduPilot/ardupilot
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AP_Compass: prevent saving of device IDs when not calibrated
this fixes an issue with the following sequence: - new board (or board with FORMAT_VERSION reset) starts up with only internal compasses - internal compasses are detected and devids saved - an external compass is added and the board is rebooted - the external compass will not be the first compass - user then calibrates and flies, but has internal as primary this can lead to a very bad experience for new users. At least one vehicle has crashed due to this sequence. The fix is to not save device IDs during the Compass::init() if we have never been calibrated. This means that when an external compass is added it will come up as the first compass. This also removes the saving of the extra device ID. It was never intended that these be saved (there is a comment to that effect in the code), but actually they were saved.
- Loading branch information
Showing
2 changed files
with
51 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters