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
Decode and use ESC_TELEMETRY_X_TO_Y mavlink packets as an AP_ESC_Telem_Backend #19668
Decode and use ESC_TELEMETRY_X_TO_Y mavlink packets as an AP_ESC_Telem_Backend #19668
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very cool. How do you switch it off?
If no ESC_TELEMETRY_X_TO_Y mavlink packets come in, it will stop updating the AP_ESC_Telem. Does that answer your question? Or Are you asking to use a preprocessor compile macro like "HAL_MAVLINK_ESC_TELEM_INPUT_ENABLED" ? |
seems a bit dangerous for something like two vehicles doing followme, or a swarm. They will each bounce packets back and forth between them |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we could end up bouncing packets back and forth infiniitely
@@ -122,6 +123,105 @@ bool MAVLink_routing::check_and_forward(mavlink_channel_t in_channel, const mavl | |||
return true; | |||
} | |||
|
|||
#if HAL_WITH_ESC_TELEM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is really in the wrong place, should be in AP_ESC_Telem_Backend, and only when enabled
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @tridge, Could you explain to me why these lines are in the wrong place? I have built this code and It works fine. I'm sorry. I'm a newbie for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these messages are not targeted to a specific sysid, so I don't think they are safe to use in this way.
imagine 2 vehicles on the radio link, both generating these msgs, they would consume each others esc telem msgs and get the wrong RPMs to notch filter
…an AP_ESC_Telem_Backend
…n AP_ESC_Telem_Backend
76dca36
to
80b93b6
Compare
How exaclly can I prevent the packets from bouncing? |
@@ -122,6 +123,105 @@ bool MAVLink_routing::check_and_forward(mavlink_channel_t in_channel, const mavl | |||
return true; | |||
} | |||
|
|||
#if HAL_WITH_ESC_TELEM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these messages are not targeted to a specific sysid, so I don't think they are safe to use in this way.
imagine 2 vehicles on the radio link, both generating these msgs, they would consume each others esc telem msgs and get the wrong RPMs to notch filter
Thanks for the clarifications, closing it now. |
An alternative to #19666, using a completely different approach.