voted_sensors_update: initialize _last_magnetometer & _last_airdata

This commit is contained in:
Beat Küng 2018-06-13 12:13:44 +02:00 committed by Lorenz Meier
parent 20f2303e8a
commit f241e49ebf
1 changed files with 2 additions and 0 deletions

View File

@ -54,6 +54,8 @@ VotedSensorsUpdate::VotedSensorsUpdate(const Parameters &parameters, bool hil_en
: _parameters(parameters), _hil_enabled(hil_enabled)
{
memset(&_last_sensor_data, 0, sizeof(_last_sensor_data));
memset(&_last_magnetometer, 0, sizeof(_last_magnetometer));
memset(&_last_airdata, 0, sizeof(_last_airdata));
memset(&_last_accel_timestamp, 0, sizeof(_last_accel_timestamp));
memset(&_accel_diff, 0, sizeof(_accel_diff));
memset(&_gyro_diff, 0, sizeof(_gyro_diff));