AP_Compass: fixed build warning on g++ 10.2

This commit is contained in:
Andrew Tridgell 2021-07-23 08:00:06 +10:00 committed by Randy Mackay
parent 562968a1da
commit 882472f25b
1 changed files with 3 additions and 1 deletions

View File

@ -164,7 +164,9 @@ void CompassLearn::update(void)
sample_available = false;
num_samples = 0;
have_earth_field = false;
memset(predicted_offsets, 0, sizeof(predicted_offsets));
for (auto &v : predicted_offsets) {
v.zero();
}
worst_error = 0;
best_error = 0;
best_yaw_deg = 0;