VTOL att control: Fix status reporting

The transition state reporting was inverted because of a typo. Code analysis suggests this will only have an effect in manual transition.
This commit is contained in:
Lorenz Meier
2016-12-25 17:10:37 +01:00
parent 1141079a3b
commit d6ef137e59
2 changed files with 8 additions and 7 deletions

View File

@@ -221,11 +221,11 @@ void Standard::update_vtol_state()
break;
case TRANSITION_TO_FW:
_vtol_mode = mode::TRANSITION_TO_MC;
_vtol_mode = mode::TRANSITION_TO_FW;
break;
case TRANSITION_TO_MC:
_vtol_mode = mode::TRANSITION_TO_FW;
_vtol_mode = mode::TRANSITION_TO_MC;
break;
}
}

View File

@@ -62,12 +62,13 @@ struct Params {
float fw_min_alt; // minimum relative altitude for FW mode (QuadChute)
};
// Has to match 1:1 msg/vtol_vehicle_status.msg
enum mode {
ROTARY_WING = 0,
FIXED_WING,
TRANSITION_TO_FW,
TRANSITION_TO_MC,
EXTERNAL
TRANSITION_TO_FW = 1,
TRANSITION_TO_MC = 2,
ROTARY_WING = 3,
FIXED_WING = 4,
EXTERNAL = 5
};
enum vtol_type {