mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 07:03:34 +08:00
vtol/fw/mc: fix VTOL enum shadowing
This changes the enums used for various VTOL states to enum classes which makes them type-safe and should avoid shadowing. This change was motivated by a Clang warning about shadowing of the enum const TRANSITION_TO_FW which was declared twice, once in vtol_type.h and once in standard.h. This change only removes the shadowing but presumably these enums could be cleaned up and consolidated further.
This commit is contained in:
@@ -256,7 +256,7 @@ MulticopterAttitudeControl::vehicle_status_poll()
|
||||
|
||||
int32_t vt_type = -1;
|
||||
if (param_get(param_find("VT_TYPE"), &vt_type) == PX4_OK) {
|
||||
_is_tailsitter = (vt_type == vtol_type::TAILSITTER);
|
||||
_is_tailsitter = (static_cast<vtol_type>(vt_type) == vtol_type::TAILSITTER);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user