-
-
Notifications
You must be signed in to change notification settings - Fork 511
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 action features #377
Add action features #377
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.
Looks correct except that one s
.
return grpc::Status::OK; | ||
} | ||
|
||
grpc::Status TransitionToFixedWings(grpc::ServerContext * /* context */, |
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.
TransitionToFixedWings >
TransitionToFixedWing` even though there are two wings.
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.
Haha thanks! I never know, I guess I'm slowly adding this typo everywhere :/. I'll be careful from now on!
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.
Actually, I cannot change it here because it is in the proto file. So the best I can do is promise you that I will update the proto file :D.
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.
More than a promise: it is here: mavlink/MAVSDK-Proto#18 :)
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.
👍
EXPECT_EQ(rpc_result, GetParam().first); | ||
} | ||
|
||
std::string killAndGetTranslatedResult(const dronecore::ActionResult kill_result) |
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.
Do we need these translation functions for each and every action? Couldn't you just test it in a way like:
EXPECT_EQ(ActionResult::to_string(rpc_result), GetParam().first);
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 tried to find a way to make it generic, but here, we would need to pass the type for KillResponse
, somehow pass actionService.Kill
(as a lambda or template, Idk). And that would be fine.
But, more importantly, we would have to deal with:
ON_CALL_action, kill()
And I have no clue how to do that, because ON_CALL
is a macro, right?
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.
You tell me, ok.
b890c56
to
d5c7e67
Compare
d5c7e67
to
d8965de
Compare
Add action features
I had some time in the plane, and this one was convenient to do. It's adding support for all the remaining actions in the backend.
Fixes #315.