-
Notifications
You must be signed in to change notification settings - Fork 17.6k
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
GCS_MAVLink: Remove wrong usage of COMMAND_ACK message #14452
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.
I preserved the current insane behaviour in a refactor - thus that comment.
Have you checked apmplanner2 it may special-case this - I don't know? I know that it interprets command-acks.
I do know this will be a significant behaviour change for MAVProxy users as they won't get the feedback on success/failure they currently do - unless they have the console open. dronekit-python users likewise - it may break scripts.
I opened ArduPilot/pymavlink#411 several weeks ago as a move towards what you're doing in this PR :-)
Better by far to actually use the actual MAV_CMD_DO_SET_MODE
- you get a legitimate ACK from that, and it can provide you a hint as to what's gone wrong and how permanent a thing it is. I believe APMplanner2 will actually interpret that CMD_ACK, too. That's no an infallible system; I really wish there was an opaque identifier in these commands.
I have only checked with QGC team, I did a small discussion here about the usage of the deprecated command SET_MODE and move to the non deprecated alternative MAV_CMD_DO_SET_MODE. If someone is using ACK_COMMAND to acknowledge SET_MODE, they are breaking the mavlink specification. |
This effects GCSs. Has this been tested on MissionPlanner or QGC? @DonLakeFlyer @meee1 |
We should test this against MP before merging. |
MP has never used this ack. |
What about generating an immediate heartbeat on successful mode change? |
QGC doesn't use it |
On Sun, 7 Jun 2020, Tom Pittenger wrote:
What about generating an immediate heartbeat on successful mode change?
ArduPilot does that.
|
for GCS that have been correctly updated to use the command this makes no difference |
It sounds like this old, bad send-ack code is going to be with us for a very long time. @patrickelectric did you want to keep this PR open for the next 3 years until everyone's moved away from the message to the command, or shall we close this and redo it in the future? |
Nudge @patrickelectric |
We could close it, no problem. |
Less than 1 year to follow the MAVLink standard correctly. |
136b6d0
to
7d84a2f
Compare
After 4 years, @peterbarker I believe that is time to merge it. |
SET_MODE message does not exist inside the MAV_CMD enum as described in the mavlink specification. The system that is using SET_MODE to communicate with the vehicle should rely on HEARTBEAT message to detect if the mode was set correctly. Signed-off-by: Patrick José Pereira <[email protected]>
7d84a2f
to
5aafdff
Compare
Thanks everybody! |
SET_MODE message does not exist inside the MAV_CMD enum
as described in the mavlink specification for COMMAND_ACK.
The system that is using SET_MODE to communicate with the
vehicle should rely on HEARTBEAT message to detect if
the mode was set correctly.
Signed-off-by: Patrick José Pereira [email protected]