diff options
author | Roman Bapst <romanbapst@yahoo.de> | 2014-12-04 17:36:16 +0100 |
---|---|---|
committer | Roman Bapst <romanbapst@yahoo.de> | 2014-12-04 17:36:16 +0100 |
commit | 590489d49859c77ef2e919f2ef45e9dc81e28f9f (patch) | |
tree | 12d40fac9392d625896b5f2498319a1529590dff | |
parent | 692af62885e42fcaa09a5960c763549868090a6e (diff) | |
download | px4-firmware-590489d49859c77ef2e919f2ef45e9dc81e28f9f.tar.gz px4-firmware-590489d49859c77ef2e919f2ef45e9dc81e28f9f.tar.bz2 px4-firmware-590489d49859c77ef2e919f2ef45e9dc81e28f9f.zip |
make sure vtol attitude control module is started with idle speed set for multicopter mode
-rw-r--r-- | src/modules/vtol_att_control/vtol_att_control_main.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/modules/vtol_att_control/vtol_att_control_main.cpp b/src/modules/vtol_att_control/vtol_att_control_main.cpp index c9c6368b2..e69c51142 100644 --- a/src/modules/vtol_att_control/vtol_att_control_main.cpp +++ b/src/modules/vtol_att_control/vtol_att_control_main.cpp @@ -202,7 +202,7 @@ VtolAttitudeControl::VtolAttitudeControl() : _loop_perf(perf_alloc(PC_ELAPSED, "mc_att_control")) { - flag_idle_mc = true; /*assume we always start in mc mode for a VTOL airframe */ + flag_idle_mc = true; memset(& _vtol_vehicle_status, 0, sizeof(_vtol_vehicle_status)); _vtol_vehicle_status.vtol_in_rw_mode = true; /* start vtol in rotary wing mode*/ @@ -520,7 +520,11 @@ void VtolAttitudeControl::task_main() _actuator_inputs_mc = orb_subscribe(ORB_ID(actuator_controls_virtual_mc)); _actuator_inputs_fw = orb_subscribe(ORB_ID(actuator_controls_virtual_fw)); - parameters_update(); /*initialize parameter cache/* + parameters_update(); // initialize parameter cache + + // make sure we start with idle in mc mode + set_idle_mc(); + flag_idle_mc = true; /* wakeup source*/ struct pollfd fds[3]; /*input_mc, input_fw, parameters*/ |