Remove vestiges of LearnType::LEARN_INTERNAL #29150
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
57a3bc1 changed the code from "internal" to "in-flight
It seems the old value of "1" was no longer valid
It also changed things so that the learning system saved the offsets.
We have two sorts of compass learning:
Copy-values-from-EKF sets-and-saves offsets on a per-vehicle basis at the moment, eg. https://github.com/ardupilot/ardupilot/blob/master/ArduCopter/AP_Arming.cpp#L814 so it doesn't want or need this code.
The in-flight learning system sets-and-saves the offsets via a called to fixed-mag-cal-yaw code here: https://github.com/ardupilot/ardupilot/blob/master/libraries/AP_Compass/Compass_learn.cpp#L65 (https://github.com/ardupilot/ardupilot/master/libraries/AP_Compass/AP_Compass_Calibration.cpp#L566)
This does seem to have been some sort of back-door for saving compass offsets on Rover, Plane and Tracker, bypassing "forcecal" requirements.