-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Add COMMAND_CANCEL - message to cancel long running commands #1401
Conversation
Co-authored-by: Julian Oes <julian@oes.ch>
@julianoes Thanks very much. Good point. I have accepted your suggestion as it makes sense - the sequence can only complete once, and with one result.
|
@julianoes When you get a chance - new related question above: #1401 (comment) |
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 think that's good.
@julianoes I can merge this, but I'd quite like to resolve what we do if the final Cancel or Fail or Accepted ACK is missed? If not, then can merge this and defer to the dev call. |
@hamishwillee sorry I missed that:
|
The difference is, if there is a timeout after sending a command you can re-request it. So to be very clear, you're saying that if a component misses the final ACK (for any reason) it will timeout and return to idle (presumably notifying the user that the operation timed out). The only other way I can see doing this is another message to request a progress update - the system then returns either the current progress or the last sent ACK. Lets chat in the call. |
Merging the cancel message as WIP. Associated docs in mavlink/mavlink-devguide#243 |
@julianoes @auturgy This adds message to cancel a long running command, as suggested by @LorenzMeier
The message just takes a target sysid and compid, and the command being cancelled (not strictly needed if concurrency not supported, but a good check to make).
I don't have to implement this, so important you check the logic.
Essentially the sequence continues with progress updates until it completes - with one of acceptance, failure or cancellation. If the cancel message was sent, received and obeyed the flow would look like this.
If no cancellation or other completion ACK is received, the cancel request can be retried
![](https://camo.githubusercontent.com/29e0c5d0b369c3231ca9d9da952939c559a4660af9abb029783306f17bb17bef/68747470733a2f2f6d65726d6169642e696e6b2f696d672f65794a6a6232526c496a6f696332567864575675593256456157466e636d46744f3178754943416749484268636e527059326c775957353049456444553178754943416749484268636e527059326c7759573530494552796232356c584734674943416752304e544c54342d52484a76626d553649454e5054553142546b52665445394f52796770584734674943416752304e544c54342d52304e544f69425464474679644342306157316c62335630584734674943416752484a76626d5574506a354851314d3649454e5054553142546b526651554e4c4b484a6c633356736444314e51565a66556b56545655785558306c4f583142535430645352564e544c484279623264795a584e7a50543870584734674943416752304e544c54342d52304e544f694254644746796443416f624739755a3256794b5342306157316c623356305847346749434167546d39305a5342796157646f644342765a69424851314d36494334754c69427462334a6c494856775a4746305a584e63626941674943424851314d74506a3545636d39755a546f675130394e5455464f52463944515535445255776f59323974625746755a436c63626941674943424851314d74506a354851314d3649464e3059584a304948527062575676645852636269416749434245636d39755a53302d506b6444557a6f675130394e5455464f524639425130736f636d567a6457783050553142566c395352564e56544652665355356655464a5052314a4655314d67623349675455465758314a465531564d5646394251304e465546524652436c63626941674943424851314d74506a3545636d39755a546f675130394e5455464f52463944515535445255776f59323974625746755a436c63626941674943424851314d74506a354851314d3649464e3059584a304948527062575676645852636269416749434245636d39755a53302d506b6444557a6f675130394e5455464f524639425130736f636d567a6457783050553142566c395352564e5654465266535535665130464f5130564d544556454b534973496d316c636d3168615751694f6e73696447686c625755694f694a6b5a575a6864577830496e3073496e56775a4746305a55566b61585276636949365a6d467363325639)
If the operation has completed, the cancel message can be ignored.
Does this make sense?