AP_Compass: fixed build warning on g++ 10.2

This commit is contained in:
Andrew Tridgell 2021-07-23 08:00:06 +10:00
parent da3ff2c142
commit aa0a77049e
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;