mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-20 17:33:33 +08:00
Removed subscribtion to multiple _telemetry_status instances.
Since commander handles all telemetry_status the same there is no need to subscribe to multiple instances. Signed-off-by: Claudio Micheli <claudio@auterion.com>
This commit is contained in:
committed by
Beat Küng
parent
a53594135b
commit
fb990d7de3
@@ -2552,8 +2552,13 @@ void Mavlink::publish_telemetry_status()
|
||||
_tstatus.streams = _streams.size();
|
||||
|
||||
_tstatus.timestamp = hrt_absolute_time();
|
||||
int instance;
|
||||
orb_publish_auto(ORB_ID(telemetry_status), &_telem_status_pub, &_tstatus, &instance, ORB_PRIO_DEFAULT);
|
||||
|
||||
if (_telem_status_pub == nullptr) {
|
||||
_telem_status_pub = orb_advertise_queue(ORB_ID(telemetry_status), &_tstatus, 3);
|
||||
|
||||
} else {
|
||||
orb_publish(ORB_ID(telemetry_status), _telem_status_pub, &_tstatus);
|
||||
}
|
||||
}
|
||||
|
||||
void Mavlink::check_radio_config()
|
||||
|
||||
@@ -1896,14 +1896,8 @@ MavlinkReceiver::handle_message_heartbeat(mavlink_message_t *msg)
|
||||
tstatus.remote_component_id = msg->compid;
|
||||
tstatus.remote_type = hb.type;
|
||||
tstatus.remote_system_status = hb.system_status;
|
||||
|
||||
if (_telem_status_pub == nullptr) {
|
||||
_telem_status_pub = orb_advertise(ORB_ID(telemetry_status), &tstatus);
|
||||
|
||||
} else {
|
||||
orb_publish(ORB_ID(telemetry_status), _telem_status_pub, &tstatus);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -253,7 +253,6 @@ private:
|
||||
orb_advert_t _rc_pub{nullptr};
|
||||
orb_advert_t _trajectory_waypoint_pub{nullptr};
|
||||
orb_advert_t _transponder_report_pub{nullptr};
|
||||
orb_advert_t _telem_status_pub{nullptr};
|
||||
orb_advert_t _visual_odometry_pub{nullptr};
|
||||
|
||||
static constexpr int _gps_inject_data_queue_size{6};
|
||||
|
||||
Reference in New Issue
Block a user