mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-06 04:41:36 +08:00
add VEHICLE_VTOL_STATE_QC and remove hardcoding
This commit is contained in:
@@ -4,6 +4,7 @@ uint8 VEHICLE_VTOL_STATE_TRANSITION_TO_FW = 1
|
|||||||
uint8 VEHICLE_VTOL_STATE_TRANSITION_TO_MC = 2
|
uint8 VEHICLE_VTOL_STATE_TRANSITION_TO_MC = 2
|
||||||
uint8 VEHICLE_VTOL_STATE_MC = 3
|
uint8 VEHICLE_VTOL_STATE_MC = 3
|
||||||
uint8 VEHICLE_VTOL_STATE_FW = 4
|
uint8 VEHICLE_VTOL_STATE_FW = 4
|
||||||
|
uint8 VEHICLE_VTOL_STATE_QC = 5
|
||||||
|
|
||||||
uint64 timestamp # time since system start (microseconds)
|
uint64 timestamp # time since system start (microseconds)
|
||||||
|
|
||||||
|
|||||||
@@ -235,9 +235,7 @@ bool VtolType::can_transition_on_ground()
|
|||||||
|
|
||||||
void VtolType::check_quadchute_condition()
|
void VtolType::check_quadchute_condition()
|
||||||
{
|
{
|
||||||
//TODO: adapt https://mavlink.io/en/messages/common.html#MAV_VTOL_STATE to contain MAV_VTOL_STATE_QC
|
if (_attc->get_transition_command() == vtol_vehicle_status_s::VEHICLE_VTOL_STATE_QC && !_quadchute_command_treated) {
|
||||||
//instead of hardcoded 5.
|
|
||||||
if (_attc->get_transition_command() == 5 && !_quadchute_command_treated) {
|
|
||||||
_attc->quadchute("QuadChute by command");
|
_attc->quadchute("QuadChute by command");
|
||||||
_quadchute_command_treated = true;
|
_quadchute_command_treated = true;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user