mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-23 05:03:34 +08:00
EKF2: Allocate distance sensor subscriptions as member variables
Just create the subscriptions and keep them, instead of re-creating them continuously Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
This commit is contained in:
committed by
Beat Küng
parent
bb307cd462
commit
d9498ade32
@@ -264,6 +264,8 @@ private:
|
||||
uORB::SubscriptionCallbackWorkItem _sensor_combined_sub{this, ORB_ID(sensor_combined)};
|
||||
uORB::SubscriptionCallbackWorkItem _vehicle_imu_sub{this, ORB_ID(vehicle_imu)};
|
||||
|
||||
uORB::SubscriptionMultiArray<distance_sensor_s> _distance_sensor_subs{ORB_ID::distance_sensor};
|
||||
|
||||
bool _callback_registered{false};
|
||||
|
||||
bool _distance_sensor_selected{false}; // because we can have several distance sensor instances with different orientations
|
||||
|
||||
Reference in New Issue
Block a user