Delete Simulator class subscription vars that are not used and add orb_unsubscribe() calls.

This commit is contained in:
mcsauder
2019-03-15 10:45:02 -06:00
committed by Beat Küng
parent aecf8fce58
commit a6315d4e6e
2 changed files with 5 additions and 4 deletions

View File

@@ -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);
}