mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-22 09:28:58 +00:00
Delete Simulator class subscription vars that are not used and add orb_unsubscribe() calls.
This commit is contained in:
@@ -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