mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-01 02:55:07 +08:00
Delete Simulator class subscription vars that are not used and add orb_unsubscribe() calls.
This commit is contained in:
@@ -363,8 +363,6 @@ private:
|
||||
|
||||
// uORB subscription handlers
|
||||
int _actuator_outputs_sub{-1};
|
||||
int _manual_sub{-1};
|
||||
int _vehicle_attitude_sub{-1};
|
||||
int _vehicle_status_sub{-1};
|
||||
|
||||
// hil map_ref data
|
||||
|
||||
@@ -802,8 +802,8 @@ void Simulator::poll_for_MAVLink_messages()
|
||||
|
||||
#endif
|
||||
|
||||
// subscribe to topics
|
||||
// only subscribe to the first actuator_outputs to fill a single HIL_ACTUATOR_CONTROLS
|
||||
// Subscribe to topics.
|
||||
// Only subscribe to the first actuator_outputs to fill a single HIL_ACTUATOR_CONTROLS.
|
||||
_actuator_outputs_sub = orb_subscribe_multi(ORB_ID(actuator_outputs), 0);
|
||||
_vehicle_status_sub = orb_subscribe(ORB_ID(vehicle_status));
|
||||
|
||||
@@ -873,6 +873,9 @@ void Simulator::poll_for_MAVLink_messages()
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
orb_unsubscribe(_actuator_outputs_sub);
|
||||
orb_unsubscribe(_vehicle_status_sub);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user