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:
Claudio Micheli
2019-03-07 17:30:18 +01:00
committed by Beat Küng
parent a53594135b
commit fb990d7de3
5 changed files with 87 additions and 100 deletions

View File

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