From 08d6ade585200e2c6bed73d02ebfe990e6929446 Mon Sep 17 00:00:00 2001 From: Julian Oes Date: Tue, 6 Nov 2012 19:01:04 -0800 Subject: Some failsafe hack when RC signal is lost --- apps/multirotor_att_control/multirotor_att_control_main.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'apps/multirotor_att_control') 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 */ -- cgit v1.2.3