From 4c2e6af6eee1122a7ac9a309e8f6088db1a87fbc Mon Sep 17 00:00:00 2001 From: Jonathan Challinger Date: Mon, 4 Jan 2016 14:42:22 -0800 Subject: [PATCH] AP_InertialSensor: statically register with AP_AccelCal --- libraries/AP_InertialSensor/AP_InertialSensor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/AP_InertialSensor/AP_InertialSensor.cpp b/libraries/AP_InertialSensor/AP_InertialSensor.cpp index e7c3d2df2f..fccb056792 100644 --- a/libraries/AP_InertialSensor/AP_InertialSensor.cpp +++ b/libraries/AP_InertialSensor/AP_InertialSensor.cpp @@ -368,6 +368,8 @@ AP_InertialSensor::AP_InertialSensor() : } memset(_delta_velocity_valid,0,sizeof(_delta_velocity_valid)); memset(_delta_angle_valid,0,sizeof(_delta_angle_valid)); + + AP_AccelCal::register_client(this); } /* @@ -1279,8 +1281,6 @@ void AP_InertialSensor::acal_init() if (_accel_calibrator == NULL) { _accel_calibrator = new AccelCalibrator[INS_MAX_INSTANCES]; } - - _acal->register_client(this); } // update accel calibrator