aboutsummaryrefslogtreecommitdiff
path: root/apps/multirotor_att_control
diff options
context:
space:
mode:
authorJulian Oes <joes@student.ethz.ch>2012-11-06 19:01:04 -0800
committerJulian Oes <joes@student.ethz.ch>2012-11-06 19:01:04 -0800
commit08d6ade585200e2c6bed73d02ebfe990e6929446 (patch)
treec67e6fc2e4a210fe895cc48c848b88b19e400d86 /apps/multirotor_att_control
parente0e96c005aab8b35f68ea3def75f5e762a115d32 (diff)
downloadpx4-firmware-08d6ade585200e2c6bed73d02ebfe990e6929446.tar.gz
px4-firmware-08d6ade585200e2c6bed73d02ebfe990e6929446.tar.bz2
px4-firmware-08d6ade585200e2c6bed73d02ebfe990e6929446.zip
Some failsafe hack when RC signal is lost
Diffstat (limited to 'apps/multirotor_att_control')
-rw-r--r--apps/multirotor_att_control/multirotor_att_control_main.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/multirotor_att_control/multirotor_att_control_main.c b/apps/multirotor_att_control/multirotor_att_control_main.c
index 29463d744..bfa5e1b1f 100644
--- a/apps/multirotor_att_control/multirotor_att_control_main.c
+++ b/apps/multirotor_att_control/multirotor_att_control_main.c
@@ -226,6 +226,14 @@ mc_thread_main(int argc, char *argv[])
att_sp.yaw_body = att.yaw;
}
att_sp.thrust = manual.throttle;
+
+ if(state.rc_signal_lost) {
+ att_sp.roll_body = 0.0f;
+ att_sp.pitch_body = 0.0f;
+ att_sp.yaw_body = 0.0f;
+ att_sp.thrust = 0.4f;
+ }
+
att_sp.timestamp = hrt_absolute_time();
}
/* STEP 2: publish the result to the vehicle actuators */