Removed is_rotor_wing, replaced with vehicle_type

This commit is contained in:
Timothy Scott
2019-06-13 10:04:26 +02:00
committed by Julian Oes
parent 2ca40bfc65
commit a134da6e12
21 changed files with 150 additions and 85 deletions
+2 -2
View File
@@ -153,7 +153,7 @@ void get_mavlink_navigation_mode(const struct vehicle_status_s *const status, ui
switch (status->nav_state) {
case vehicle_status_s::NAVIGATION_STATE_MANUAL:
*mavlink_base_mode |= MAV_MODE_FLAG_MANUAL_INPUT_ENABLED
| (status->is_rotary_wing ? MAV_MODE_FLAG_STABILIZE_ENABLED : 0);
| (status->vehicle_type == vehicle_status_s::VEHICLE_TYPE_ROTARY_WING ? MAV_MODE_FLAG_STABILIZE_ENABLED : 0);
custom_mode->main_mode = PX4_CUSTOM_MAIN_MODE_MANUAL;
break;
@@ -4284,7 +4284,7 @@ protected:
updated = true;
if (status.is_vtol) {
if (!status.in_transition_mode && status.is_rotary_wing) {
if (!status.in_transition_mode && status.vehicle_type == vehicle_status_s::VEHICLE_TYPE_ROTARY_WING) {
_msg.vtol_state = MAV_VTOL_STATE_MC;
} else if (!status.in_transition_mode) {