-
-
Notifications
You must be signed in to change notification settings - Fork 507
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
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.
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. |
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.
Awesome, thanks for adding this.
examples/system_info/system_info.cpp
Outdated
} | ||
|
||
// Get the system Version struct | ||
const Info::Version& systemVersion = info.get_version().second; |
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.
const Info::Version& systemVersion = info.get_version().second; | |
const Info::Version& system_version = info.get_version().second; |
And the rest below, for consistency.
examples/system_info/system_info.cpp
Outdated
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'; |
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.
Btw. you can also just do std::cout << systemVersion << '\n'
if that's what you want.
… directory to Cmake
@julianoes Fixed consistency issues in the example. |
Thanks @CY-1992. Now only the submodule update is missing. Let me try to do that real quick. |
@julianoes I thought I updated the sub module with the latest commit. May I know exactly how you have updated the submodule in MAVSDK? |
After it has been merged in proto, I did the following steps:
|
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