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

Improve info plugin #608

Merged
merged 7 commits into from
Nov 26, 2018
Merged

Improve info plugin #608

merged 7 commits into from
Nov 26, 2018

Conversation

julianoes
Copy link
Collaborator

This adapts the info API to be more consistent with other plugins and return a pair with a result and the actual struct.

It also changes the retry mechanism to use call_every instead of subscribing to the heartbeat and using that as a timeout trigger.

This API did not work as intended for the info plugin because the
request was actually not carried out if the UUID was already determined.

Therefore, we are now exposing just the part of actually sending the
request message and therefore enabling the info plugin.
This adapts the info API to be more consistent with other plugins and
return a pair with a result and the actual struct.

It also changes the retry mechanism to use call_every instead of
subscribing to the heartbeat and using that as a timeout trigger.
This is only a minimal addition to the backend to get the version of the
info plugin.
Copy link
Collaborator

@JonasVautherin JonasVautherin left a comment

Choose a reason for hiding this comment

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

LGTM, I would just use the latest master of the proto repo, now that it is merged 👍

@@ -477,14 +477,8 @@ void SystemImpl::request_autopilot_version()

_autopilot_version_pending = true;

// We don't care about an answer, we mostly care about receiving AUTOPILOT_VERSION.
MAVLinkCommands::CommandLong command{};
send_autopilot_version_request();
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

switch (result) {
case Result::SUCCESS:
return "Success";
case Result::INFORMATION_NOT_RECEIVED_YET:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is that one in the Swift implementation? I believe I saw only SUCCESS and UNKNOWN 🤔

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Bumping minor because we added the info version in backend.
@julianoes julianoes merged commit ef45e4d into develop Nov 26, 2018
@julianoes julianoes deleted the improve-info branch November 26, 2018 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants