diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2013-08-28 08:14:13 +0200 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2013-08-28 08:14:13 +0200 |
commit | 5fe3c49ba0e7e3f64f5b6c9b64ced675c01b14fe (patch) | |
tree | 5f024477d370d92edacead7412f60f6757cbf082 /src/examples/fixedwing_control/main.c | |
parent | e44d134c6c64535f67e26f9633206aba50a10613 (diff) | |
parent | 66c61fbe96e11ee7099431a8370d84f862543810 (diff) | |
download | px4-firmware-5fe3c49ba0e7e3f64f5b6c9b64ced675c01b14fe.tar.gz px4-firmware-5fe3c49ba0e7e3f64f5b6c9b64ced675c01b14fe.tar.bz2 px4-firmware-5fe3c49ba0e7e3f64f5b6c9b64ced675c01b14fe.zip |
Merged multirotor branch
Diffstat (limited to 'src/examples/fixedwing_control/main.c')
-rw-r--r-- | src/examples/fixedwing_control/main.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/examples/fixedwing_control/main.c b/src/examples/fixedwing_control/main.c index d13ffe414..b286e0007 100644 --- a/src/examples/fixedwing_control/main.c +++ b/src/examples/fixedwing_control/main.c @@ -66,7 +66,7 @@ #include <uORB/topics/parameter_update.h> #include <systemlib/param/param.h> #include <systemlib/pid/pid.h> -#include <systemlib/geo/geo.h> +#include <geo/geo.h> #include <systemlib/perf_counter.h> #include <systemlib/systemlib.h> #include <systemlib/err.h> @@ -380,9 +380,10 @@ int fixedwing_control_thread_main(int argc, char *argv[]) /* control */ - /* if in auto mode, fly global position setpoint */ - if (vstatus.state_machine == SYSTEM_STATE_AUTO || - vstatus.state_machine == SYSTEM_STATE_STABILIZED) { +#warning fix this +#if 0 + if (vstatus.navigation_state == NAVIGATION_STATE_AUTO_ || + vstatus.navigation_state == NAVIGATION_STATE_STABILIZED) { /* simple heading control */ control_heading(&global_pos, &global_sp, &att, &att_sp); @@ -400,6 +401,7 @@ int fixedwing_control_thread_main(int argc, char *argv[]) /* set flaps to zero */ actuators.control[4] = 0.0f; + } else if (vstatus.navigation_state == NAVIGATION_STATE_MANUAL) { /* if in manual mode, decide between attitude stabilization (SAS) and full manual pass-through */ } else if (vstatus.state_machine == SYSTEM_STATE_MANUAL) { if (vstatus.manual_control_mode == VEHICLE_MANUAL_CONTROL_MODE_SAS) { @@ -465,6 +467,7 @@ int fixedwing_control_thread_main(int argc, char *argv[]) } } } +#endif /* publish rates */ orb_publish(ORB_ID(vehicle_rates_setpoint), rates_pub, &rates_sp); |