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 software version type to system info #1918

Merged
merged 4 commits into from
Nov 2, 2022

Conversation

YalamareddyChaitanya
Copy link
Contributor

I do not have complete understanding of MAVSDK package. I tried to implement version type in system info. I hope this pull request would close #1910 . Also created a pull request #298 in MAVSDK-Proto

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.

Some small comments, overall this is great. And make sure to update the proto submodule in the next push, then we can merge it.

@@ -0,0 +1,114 @@
//
// Simple example to demonstrate how to query system info using MAVSDK.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Awesome, thanks for adding this.

}

// Get the system Version struct
const Info::Version& systemVersion = info.get_version().second;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
const Info::Version& systemVersion = info.get_version().second;
const Info::Version& system_version = info.get_version().second;

And the rest below, for consistency.

Comment on lines 91 to 102
std::cout << " flight_sw_major: " << systemVersion.flight_sw_major << '\n'
<< " flight_sw_minor: " << systemVersion.flight_sw_minor << '\n'
<< " flight_sw_patch: " << systemVersion.flight_sw_patch << '\n'
<< " flight_sw_version_type: " << systemVersion.flight_sw_version_type << '\n'
<< " flight_sw_vendor_major: " << systemVersion.flight_sw_vendor_major << '\n'
<< " flight_sw_vendor_minor: " << systemVersion.flight_sw_vendor_minor << '\n'
<< " flight_sw_vendor_patch: " << systemVersion.flight_sw_vendor_patch << '\n'
<< " flight_sw_git_hash: " << systemVersion.flight_sw_git_hash << '\n'
<< " os_sw_major: " << systemVersion.os_sw_major << '\n'
<< " os_sw_minor: " << systemVersion.os_sw_minor << '\n'
<< " os_sw_patch: " << systemVersion.os_sw_patch << '\n'
<< " os_sw_git_hash: " << systemVersion.os_sw_git_hash << '\n';
Copy link
Collaborator

Choose a reason for hiding this comment

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

Btw. you can also just do std::cout << systemVersion << '\n' if that's what you want.

@YalamareddyChaitanya
Copy link
Contributor Author

@julianoes Fixed consistency issues in the example.

@julianoes
Copy link
Collaborator

Thanks @CY-1992. Now only the submodule update is missing. Let me try to do that real quick.

@YalamareddyChaitanya
Copy link
Contributor Author

@julianoes I thought I updated the sub module with the latest commit. May I know exactly how you have updated the submodule in MAVSDK?

@julianoes
Copy link
Collaborator

After it has been merged in proto, I did the following steps:

cd proto
git fetch
git switch main
git merge
cd ..
git add proto
git commit

@julianoes julianoes merged commit 9177ef0 into mavlink:main Nov 2, 2022
@YalamareddyChaitanya YalamareddyChaitanya deleted the add-version-type branch November 16, 2022 07:24
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.

How to query PX4 version using MAVSDK
2 participants