diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2012-11-09 16:20:23 +0100 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2012-11-09 16:20:23 +0100 |
commit | a866fb2f2c3791f0d357a30f1e2ce33f2f984af7 (patch) | |
tree | 161f327c6771e36d2284c1f6a3f8e1e50563ad73 /apps/multirotor_att_control | |
parent | 754572f25aa7ef069e2ae61f8b3689ae9fb614ae (diff) | |
download | px4-firmware-a866fb2f2c3791f0d357a30f1e2ce33f2f984af7.tar.gz px4-firmware-a866fb2f2c3791f0d357a30f1e2ce33f2f984af7.tar.bz2 px4-firmware-a866fb2f2c3791f0d357a30f1e2ce33f2f984af7.zip |
Disable failsafe until its actually tested
Diffstat (limited to 'apps/multirotor_att_control')
-rw-r--r-- | apps/multirotor_att_control/multirotor_att_control_main.c | 33 |
1 files changed, 24 insertions, 9 deletions
diff --git a/apps/multirotor_att_control/multirotor_att_control_main.c b/apps/multirotor_att_control/multirotor_att_control_main.c index 6a8387741..3b05bfa25 100644 --- a/apps/multirotor_att_control/multirotor_att_control_main.c +++ b/apps/multirotor_att_control/multirotor_att_control_main.c @@ -234,15 +234,30 @@ mc_thread_main(int argc, char *argv[]) } att_sp.thrust = manual.throttle; - /* if the RC signal is lost, try to stay level and go slowly back down to ground */ - if(state.rc_signal_lost) { - /* the failsafe throttle is stored as a parameter, as it depends on the copter and the payload */ - param_get(failsafe_throttle_handle, &failsafe_throttle); - att_sp.roll_body = 0.0f; - att_sp.pitch_body = 0.0f; - att_sp.yaw_body = 0.0f; - att_sp.thrust = failsafe_throttle; - } + // XXX disable this for now until its better checked + + // static bool rc_loss_first_time = true; + // /* if the RC signal is lost, try to stay level and go slowly back down to ground */ + // if(state.rc_signal_lost) { + // /* the failsafe throttle is stored as a parameter, as it depends on the copter and the payload */ + // param_get(failsafe_throttle_handle, &failsafe_throttle); + // att_sp.roll_body = 0.0f; + // att_sp.pitch_body = 0.0f; + + // /* keep current yaw, do not attempt to go to north orientation, + // * since if the pilot regains RC control, he will be lost regarding + // * the current orientation. + // */ + + // if (rc_loss_first_time) + // att_sp.yaw_body = att.yaw; + // // XXX hard-limit it to prevent ballistic mishaps - this is just supposed to + // // slow a crash down, not actually keep the system in-air. + // att_sp.thrust = (failsafe_throttle < 0.5f) : failsafe_throttle ? 0.5f; + // rc_loss_first_time = false; + // } else { + // rc_loss_first_time = true; + // } att_sp.timestamp = hrt_absolute_time(); } |