-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Standard methods for parsing available flight mode for PX4 and APM #12254
Conversation
Update APM and PX4 flight mode parsing methods
Working my way through this. Found some raw flight mode strings here: https://github.com/mavlink/qgroundcontrol/blob/master/src/Vehicle/Vehicle.cc#L1267. Not sure what that is used for. |
Shouldn't this method: https://github.com/mavlink/qgroundcontrol/blob/master/src/FirmwarePlugin/FirmwarePlugin.cc#L54 be updated. A non-PX4/ArduPilot vehicle could still support the new standard modes protocol. In that case the real names should be available. Seems like it should check to see if the list is populated and use that if available, otherwise do it the old way. |
Seems odd that standard modes don't come across with names: https://github.com/mavlink/qgroundcontrol/blob/master/src/Vehicle/StandardModes.cc#L47. @bkueng That said shouldn't these be translated? |
@bkueng This is interesting as well: https://github.com/mavlink/qgroundcontrol/blob/master/src/Vehicle/StandardModes.cc#L75. Not sure it makes sense for these to not be available for usage from the flight modes menu. They don't cause a problem if used from there do they? |
@bytesByHarsh If you search for |
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.
Mainly looks great. Just a couple questions.
* Remove loose flight mode strings * Force All Enums in switch cases * Update function calls to parse flight mode list
if(WIN32) | ||
add_compile_options(/w44265 /we44265) | ||
else() | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wswitch -Werror=switch") |
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.
@HTRamsey This won't be needed with the switch to -Wall
right?
The flight modes seem to get added twice to the flight mode list in APM. It only seems to happen with master, in Plane 4.5 it's fine. |
Update APM and PX4 flight mode parsing methods
Description
Related Issue
#12191
#12128