mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-07 01:04:19 +08:00
mc_att_control_main: initialize _sensor_corrections properly
This commit is contained in:
@@ -536,6 +536,14 @@ MulticopterAttitudeControl::MulticopterAttitudeControl() :
|
||||
_ts_opt_recovery = new TailsitterRecovery();
|
||||
}
|
||||
|
||||
/* initialize _corrections to identity as we might not immediately get a topic update */
|
||||
for (unsigned i = 0; i < 3; i++) {
|
||||
_sensor_correction.gyro_scale[i] = 1.0f;
|
||||
_sensor_correction.accel_scale[i] = 1.0f;
|
||||
}
|
||||
|
||||
_sensor_correction.baro_scale = 1.0f;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user