-
-
Notifications
You must be signed in to change notification settings - Fork 514
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to use the set_always_send_heartbeats
of Configuration
#2452
Comments
set_always_send_heartbeats
` of Configuration set_always_send_heartbeats
of Configuration
The configuration option is set internally depending on the connection you add. If you are sending UDP messages to another IP (instead of listening on a local port) you need to send something to initiate the connection and allow the counterpart to send anything back. Otherwise, the communication can't really start. What are you trying to do exactly? What sort of connections are you adding? |
@julianoes The basic flow is:
Challenges Found
My goal is to completely disable the sending of
|
I see, thanks for the context. That's quite involved. I can see how this automatic option does not work for you, but I also don't want to break the behavior for existing users. One workaround I can think of is to intercept the outgoing messages and drop the heartbeats manually, using: Would that work? |
Thank you for the suggestion! I tested the approach of intercepting outgoing messages and manually dropping the heartbeats using the To help others with similar requirements, I have created an example and submitted it as a pull request: #2467. This example demonstrates how to set up an MAVLink proxy using Thank you again for pointing me in the right direction! |
I'm building on a sample Proxy Mavlink with MAVSDK between QGC and PX4 (SITL).
I would like to know how to use the
set_always_send_heartbeats
of Configuration for Autopilot even if it is defined as false.Mavsdk::Configuration custom_config(1, 1, false); custom_config.set_always_send_heartbeats(false); Mavsdk mavsdk_px4{custom_config};
This attribute is reset to true in MavsdkImpl::add_udp_connection when the
add_any_connection
is called (which seems to me to be a bug).The text was updated successfully, but these errors were encountered: