Skip to content
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

Merged
merged 7 commits into from
May 3, 2018
Merged

Add action features #377

merged 7 commits into from
May 3, 2018

Conversation

JonasVautherin
Copy link
Collaborator

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.

Copy link
Collaborator

@julianoes julianoes left a 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 */,
Copy link
Collaborator

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.

Copy link
Collaborator Author

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!

Copy link
Collaborator Author

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.

Copy link
Collaborator Author

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 :)

Copy link
Collaborator

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)
Copy link
Collaborator

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);

Copy link
Collaborator Author

@JonasVautherin JonasVautherin May 2, 2018

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?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You tell me, ok.

@JonasVautherin JonasVautherin force-pushed the add-action-features branch from b890c56 to d5c7e67 Compare May 2, 2018 21:03
@JonasVautherin JonasVautherin force-pushed the add-action-features branch from d5c7e67 to d8965de Compare May 3, 2018 00:42
@julianoes julianoes merged commit 2eefc6d into develop May 3, 2018
@julianoes julianoes deleted the add-action-features branch May 3, 2018 18:04
rt-2pm2 pushed a commit to rt-2pm2/DronecodeSDK that referenced this pull request Nov 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants