mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-17 15:23:33 +08:00
ekf2 selector fix SITL lockstep
- ekf2 selector don't register lockstep until first attitude publication - sensors module register lockstep component - enable multi-EKF2 in SITL
This commit is contained in:
@@ -178,6 +178,7 @@ private:
|
||||
|
||||
VehicleIMU *_vehicle_imu_list[MAX_SENSOR_COUNT] {};
|
||||
|
||||
int _lockstep_component{-1};
|
||||
|
||||
/**
|
||||
* Update our local parameter cache.
|
||||
@@ -297,6 +298,8 @@ Sensors::~Sensors()
|
||||
}
|
||||
|
||||
perf_free(_loop_perf);
|
||||
|
||||
px4_lockstep_unregister_component(_lockstep_component);
|
||||
}
|
||||
|
||||
bool Sensors::init()
|
||||
@@ -639,6 +642,12 @@ void Sensors::Run()
|
||||
parameter_update_poll();
|
||||
}
|
||||
|
||||
if (_lockstep_component == -1) {
|
||||
_lockstep_component = px4_lockstep_register_component();
|
||||
}
|
||||
|
||||
px4_lockstep_progress(_lockstep_component);
|
||||
|
||||
perf_end(_loop_perf);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user