add VEHICLE_VTOL_STATE_QC and remove hardcoding

This commit is contained in:
Thomas
2021-02-03 14:35:45 +01:00
committed by Roman Bapst
parent d3ddbe8db5
commit bf9758247b
2 changed files with 2 additions and 3 deletions
+1 -3
View File
@@ -235,9 +235,7 @@ bool VtolType::can_transition_on_ground()
void VtolType::check_quadchute_condition()
{
//TODO: adapt https://mavlink.io/en/messages/common.html#MAV_VTOL_STATE to contain MAV_VTOL_STATE_QC
//instead of hardcoded 5.
if (_attc->get_transition_command() == 5 && !_quadchute_command_treated) {
if (_attc->get_transition_command() == vtol_vehicle_status_s::VEHICLE_VTOL_STATE_QC && !_quadchute_command_treated) {
_attc->quadchute("QuadChute by command");
_quadchute_command_treated = true;