-
-
Notifications
You must be signed in to change notification settings - Fork 529
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 NO_SETPOINT_SET result to Offboard plugin #738
Add NO_SETPOINT_SET result to Offboard plugin #738
Conversation
plugins/offboard/offboard_impl.cpp
Outdated
@@ -459,6 +459,8 @@ Offboard::Result OffboardImpl::offboard_result_from_command_result(MAVLinkComman | |||
return Offboard::Result::COMMAND_DENIED; | |||
case MAVLinkCommands::Result::TIMEOUT: | |||
return Offboard::Result::TIMEOUT; | |||
case MAVLinkCommands::Result::NO_SETPOINT_SET: |
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.
But MAVLinkCommands::Result::NO_SETPOINT_SET
does not exist:
https://github.com/Dronecode/DronecodeSDK/blob/4332994c55c9ac8357954ccd1afcc5fa4a87172a/core/mavlink_commands.h#L19-L28
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.
OK, just added.
@@ -67,6 +67,8 @@ const char *Offboard::result_str(Result result) | |||
return "Command denied"; | |||
case Result::TIMEOUT: | |||
return "Timeout"; | |||
case Result::NO_SETPOINT_SET: | |||
return "No setpoint set"; |
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 one is correct.
core/mavlink_commands.h
Outdated
@@ -24,6 +24,7 @@ class MAVLinkCommands { | |||
COMMAND_DENIED, | |||
TIMEOUT, | |||
IN_PROGRESS, | |||
NO_SETPOINT_SET, |
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.
Nono, a MAVLink command can't ever have that result. It's an invention of the SDK :)
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.
Ah I see. OK I removed from mavlink command results and offboard_result_from_command_result()
.
…vention of the SDK.
Yay! Thanks @cswkim! |
I think the 2 changed files are the only places that need updating, but I'm not 100% sure. If someone could please verify.
Resolves #732