Skip to content

Commit

Permalink
Mavlink receiver unadvertise all
Browse files Browse the repository at this point in the history
uorb multi pubs in destructor
  • Loading branch information
AlexKlimaj committed May 23, 2023
1 parent c903288 commit 256c688
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions src/modules/mavlink/mavlink_receiver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,16 @@ MavlinkReceiver::~MavlinkReceiver()
#if !defined(CONSTRAINED_FLASH)
delete[] _received_msg_stats;
#endif // !CONSTRAINED_FLASH

_distance_sensor_pub.unadvertise();
_gps_inject_data_pub.unadvertise();
_rc_pub.unadvertise();
_manual_control_input_pub.unadvertise();
_ping_pub.unadvertise();
_radio_status_pub.unadvertise();
_sensor_baro_pub.unadvertise();
_sensor_gps_pub.unadvertise();
_sensor_optical_flow_pub.unadvertise();
}

static constexpr vehicle_odometry_s vehicle_odometry_empty {
Expand Down
2 changes: 1 addition & 1 deletion src/modules/mavlink/mavlink_receiver.h
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ class MavlinkReceiver : public ModuleParams
uORB::PublicationMulti<radio_status_s> _radio_status_pub{ORB_ID(radio_status)};
uORB::PublicationMulti<sensor_baro_s> _sensor_baro_pub{ORB_ID(sensor_baro)};
uORB::PublicationMulti<sensor_gps_s> _sensor_gps_pub{ORB_ID(sensor_gps)};
uORB::PublicationMulti<sensor_optical_flow_s> _sensor_optical_flow_pub{ORB_ID(sensor_optical_flow)};
uORB::PublicationMulti<sensor_optical_flow_s> _sensor_optical_flow_pub{ORB_ID(sensor_optical_flow)};

// ORB publications (queue length > 1)
uORB::Publication<transponder_report_s> _transponder_report_pub{ORB_ID(transponder_report)};
Expand Down

0 comments on commit 256c688

Please sign in to comment.