aboutsummaryrefslogtreecommitdiff
path: root/apps/multirotor_att_control/multirotor_att_control_main.c
diff options
context:
space:
mode:
authorJulian Oes <joes@student.ethz.ch>2013-02-22 19:46:47 -0800
committerJulian Oes <joes@student.ethz.ch>2013-02-22 19:46:47 -0800
commit0eca49a4f6d4a06868770c8b0c36094d889cb846 (patch)
tree4a7ba0faccf1c704a08d490606971fd5086b1e96 /apps/multirotor_att_control/multirotor_att_control_main.c
parentf731b6f4e5b009cf12d66c9ff2f5bbed47ca14af (diff)
downloadpx4-firmware-0eca49a4f6d4a06868770c8b0c36094d889cb846.tar.gz
px4-firmware-0eca49a4f6d4a06868770c8b0c36094d889cb846.tar.bz2
px4-firmware-0eca49a4f6d4a06868770c8b0c36094d889cb846.zip
Checkpoint: Separated all bools in vehicle status into conditions and flags, they should be protected
Diffstat (limited to 'apps/multirotor_att_control/multirotor_att_control_main.c')
-rw-r--r--apps/multirotor_att_control/multirotor_att_control_main.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/multirotor_att_control/multirotor_att_control_main.c b/apps/multirotor_att_control/multirotor_att_control_main.c
index da7550f79..79ca9fe2d 100644
--- a/apps/multirotor_att_control/multirotor_att_control_main.c
+++ b/apps/multirotor_att_control/multirotor_att_control_main.c
@@ -247,7 +247,7 @@ mc_thread_main(int argc, char *argv[])
/* initialize to current yaw if switching to manual or att control */
if (state.flag_control_attitude_enabled != flag_control_attitude_enabled ||
state.flag_control_manual_enabled != flag_control_manual_enabled ||
- state.flag_system_armed != flag_system_armed) {
+ state.flag_fmu_armed != flag_system_armed) {
att_sp.yaw_body = att.yaw;
}
@@ -291,7 +291,7 @@ mc_thread_main(int argc, char *argv[])
att_sp.pitch_body = manual.pitch;
/* set attitude if arming */
- if (!flag_control_attitude_enabled && state.flag_system_armed) {
+ if (!flag_control_attitude_enabled && state.flag_fmu_armed) {
att_sp.yaw_body = att.yaw;
}
@@ -395,7 +395,8 @@ mc_thread_main(int argc, char *argv[])
/* update state */
flag_control_attitude_enabled = state.flag_control_attitude_enabled;
flag_control_manual_enabled = state.flag_control_manual_enabled;
- flag_system_armed = state.flag_system_armed;
+ flag_system_armed = state.flag_fmu_armed;
+ // XXX add some logic to this
perf_end(mc_loop_perf);
} /* end of poll call for attitude updates */