diff --git a/libraries/AP_InertialSensor/AP_InertialSensor_tempcal.cpp b/libraries/AP_InertialSensor/AP_InertialSensor_tempcal.cpp index cefe84f6f4..c672683a48 100644 --- a/libraries/AP_InertialSensor/AP_InertialSensor_tempcal.cpp +++ b/libraries/AP_InertialSensor/AP_InertialSensor_tempcal.cpp @@ -376,7 +376,7 @@ void AP_InertialSensor::TCal::update_gyro_learning(const Vector3f &gyro, float t */ void AP_InertialSensor::TCal::Learn::reset(float temperature) { - memset(state, 0, sizeof(state)); + memset((void*)&state[0], 0, sizeof(state)); start_tmax = tcal.temp_max; accel_start.zero(); for (uint8_t i=0; i