mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-13 02:07:36 +08:00
Added variable initializations back into EstimatorInterface() constructor to resolve a runtime error that occurs with uninitialized variables.
This commit is contained in:
@@ -47,8 +47,30 @@
|
||||
#include <mathlib/mathlib.h>
|
||||
|
||||
|
||||
EstimatorInterface::EstimatorInterface()
|
||||
EstimatorInterface::EstimatorInterface():
|
||||
_dt_imu_avg(0.0f),
|
||||
_imu_ticks(0),
|
||||
_imu_updated(false),
|
||||
_initialised(false),
|
||||
_vehicle_armed(false),
|
||||
_in_air(false),
|
||||
_NED_origin_initialised(false),
|
||||
_gps_speed_valid(false),
|
||||
_gps_speed_accuracy(0.0f),
|
||||
_mag_healthy(false),
|
||||
_yaw_test_ratio(0.0f),
|
||||
_time_last_imu(0),
|
||||
_time_last_gps(0),
|
||||
_time_last_mag(0),
|
||||
_time_last_baro(0),
|
||||
_time_last_range(0),
|
||||
_time_last_airspeed(0),
|
||||
_mag_declination_gps(0.0f),
|
||||
_mag_declination_to_save_deg(0.0f)
|
||||
{
|
||||
_pos_ref = {};
|
||||
_mag_test_ratio = {};
|
||||
_vel_pos_test_ratio = {};
|
||||
}
|
||||
|
||||
EstimatorInterface::~EstimatorInterface()
|
||||
|
||||
Reference in New Issue
Block a user