mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-16 07:43:34 +08:00
px4_work_queue: directly support SITL lockstep
- the purpose is to ensure that every WorkItem (and WorkItems scheduled by WorkItems) is allowed to run to completion every step - per workqueue register a lockstep component whenever a work item is added (if not already registered) - once the work queue is empty unregister component
This commit is contained in:
committed by
Lorenz Meier
parent
8c71ecd97e
commit
98cff94702
@@ -178,8 +178,6 @@ private:
|
||||
|
||||
VehicleIMU *_vehicle_imu_list[MAX_SENSOR_COUNT] {};
|
||||
|
||||
int _lockstep_component{-1};
|
||||
|
||||
/**
|
||||
* Update our local parameter cache.
|
||||
*/
|
||||
@@ -282,8 +280,6 @@ Sensors::~Sensors()
|
||||
}
|
||||
|
||||
perf_free(_loop_perf);
|
||||
|
||||
px4_lockstep_unregister_component(_lockstep_component);
|
||||
}
|
||||
|
||||
bool Sensors::init()
|
||||
@@ -626,12 +622,6 @@ 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