Skip to content

Commit

Permalink
Merge pull request #2097 from mavlink/pr-fix-remote-connection
Browse files Browse the repository at this point in the history
core: send heartbeats to UDP remote
  • Loading branch information
julianoes authored Aug 24, 2023
2 parents ab63cd8 + 57ad92d commit 5283931
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/mavsdk/core/mavsdk_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,13 @@ std::pair<ConnectionResult, Mavsdk::ConnectionHandle> MavsdkImpl::setup_udp_remo
if (_systems.empty()) {
make_system_with_component(0, 0);
}

// With a UDP remote, we need to initiate the connection by sending
// heartbeats.
auto new_configuration = get_configuration();
new_configuration.set_always_send_heartbeats(true);
set_configuration(new_configuration);

return {ret, handle};
} else {
return {ret, Mavsdk::ConnectionHandle{}};
Expand Down

0 comments on commit 5283931

Please sign in to comment.