|
|
|
@ -197,6 +197,8 @@ static struct home_position_s _home;
@@ -197,6 +197,8 @@ static struct home_position_s _home;
|
|
|
|
|
|
|
|
|
|
static unsigned _last_mission_instance = 0; |
|
|
|
|
|
|
|
|
|
struct vtol_vehicle_status_s vtol_status; |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* The daemon app only briefly exists to start |
|
|
|
|
* the background job. The stack size assigned in the |
|
|
|
@ -1169,7 +1171,7 @@ int commander_thread_main(int argc, char *argv[])
@@ -1169,7 +1171,7 @@ int commander_thread_main(int argc, char *argv[])
|
|
|
|
|
|
|
|
|
|
/* Subscribe to vtol vehicle status topic */ |
|
|
|
|
int vtol_vehicle_status_sub = orb_subscribe(ORB_ID(vtol_vehicle_status)); |
|
|
|
|
struct vtol_vehicle_status_s vtol_status; |
|
|
|
|
//struct vtol_vehicle_status_s vtol_status;
|
|
|
|
|
memset(&vtol_status, 0, sizeof(vtol_status)); |
|
|
|
|
vtol_status.vtol_in_rw_mode = true; //default for vtol is rotary wing
|
|
|
|
|
|
|
|
|
@ -2682,13 +2684,13 @@ set_control_mode()
@@ -2682,13 +2684,13 @@ set_control_mode()
|
|
|
|
|
!offboard_control_mode.ignore_velocity || |
|
|
|
|
!offboard_control_mode.ignore_acceleration_force; |
|
|
|
|
|
|
|
|
|
control_mode.flag_control_velocity_enabled = !offboard_control_mode.ignore_velocity || |
|
|
|
|
!offboard_control_mode.ignore_position; |
|
|
|
|
control_mode.flag_control_velocity_enabled = (!offboard_control_mode.ignore_velocity || |
|
|
|
|
!offboard_control_mode.ignore_position) && !vtol_status.vtol_in_trans_mode; |
|
|
|
|
|
|
|
|
|
control_mode.flag_control_climb_rate_enabled = !offboard_control_mode.ignore_velocity || |
|
|
|
|
!offboard_control_mode.ignore_position; |
|
|
|
|
|
|
|
|
|
control_mode.flag_control_position_enabled = !offboard_control_mode.ignore_position; |
|
|
|
|
control_mode.flag_control_position_enabled = !offboard_control_mode.ignore_position && !vtol_status.vtol_in_trans_mode; |
|
|
|
|
|
|
|
|
|
control_mode.flag_control_altitude_enabled = !offboard_control_mode.ignore_velocity || |
|
|
|
|
!offboard_control_mode.ignore_position; |
|
|
|
|