aboutsummaryrefslogtreecommitdiff
path: root/src/examples/fixedwing_control/main.c
diff options
context:
space:
mode:
authorJulian Oes <julian@oes.ch>2013-08-15 14:04:46 +0200
committerJulian Oes <julian@oes.ch>2013-08-15 14:04:46 +0200
commit56575eb068879beb68b3730ca6d3bb3755d6960a (patch)
tree1b7b4c028c2b936db81310e82a8ef84adc125e3d /src/examples/fixedwing_control/main.c
parent50cf1c01b701fced6437dfe574fd09cd312b9f15 (diff)
parent561ec495b7df5b3ff4536d16d1389d1f02affd06 (diff)
downloadpx4-firmware-56575eb068879beb68b3730ca6d3bb3755d6960a.tar.gz
px4-firmware-56575eb068879beb68b3730ca6d3bb3755d6960a.tar.bz2
px4-firmware-56575eb068879beb68b3730ca6d3bb3755d6960a.zip
Merge remote-tracking branch 'px4/new_state_machine_drton' into fmuv2_bringup_new_state_machine_drton
Conflicts: src/drivers/blinkm/blinkm.cpp src/drivers/px4io/px4io.cpp src/modules/commander/state_machine_helper.c src/modules/px4iofirmware/protocol.h src/modules/px4iofirmware/registers.c src/modules/systemlib/systemlib.h src/systemcmds/reboot/reboot.c
Diffstat (limited to 'src/examples/fixedwing_control/main.c')
-rw-r--r--src/examples/fixedwing_control/main.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/examples/fixedwing_control/main.c b/src/examples/fixedwing_control/main.c
index d13ffe414..e29f76877 100644
--- a/src/examples/fixedwing_control/main.c
+++ b/src/examples/fixedwing_control/main.c
@@ -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);