diff options
author | Thomas Gubler <thomasgubler@gmail.com> | 2014-09-07 15:31:58 +0200 |
---|---|---|
committer | Thomas Gubler <thomasgubler@gmail.com> | 2014-09-22 10:54:00 +0200 |
commit | a8239b2c4516c36d30767c0ae61b30f1e2dde096 (patch) | |
tree | 21ad36cf31e0ac2f174f64f4d8ab25b399602550 /src/modules/navigator | |
parent | 21009e89a4c748d8a61174058bb378c1d6306b8d (diff) | |
download | px4-firmware-a8239b2c4516c36d30767c0ae61b30f1e2dde096.tar.gz px4-firmware-a8239b2c4516c36d30767c0ae61b30f1e2dde096.tar.bz2 px4-firmware-a8239b2c4516c36d30767c0ae61b30f1e2dde096.zip |
if V_RCL_LT < 0 go directly to termination
Diffstat (limited to 'src/modules/navigator')
-rw-r--r-- | src/modules/navigator/rcloss.cpp | 15 | ||||
-rw-r--r-- | src/modules/navigator/rcloss_params.c | 3 |
2 files changed, 13 insertions, 5 deletions
diff --git a/src/modules/navigator/rcloss.cpp b/src/modules/navigator/rcloss.cpp index 651e31184..5564a1c42 100644 --- a/src/modules/navigator/rcloss.cpp +++ b/src/modules/navigator/rcloss.cpp @@ -153,10 +153,17 @@ RCLoss::advance_rcl() { switch (_rcl_state) { case RCL_STATE_NONE: - /* Check the number of data link losses. If above home fly home directly */ - warnx("RC loss, OBC mode, loiter"); - mavlink_log_info(_navigator->get_mavlink_fd(), "#audio: rc loss, loitering"); - _rcl_state = RCL_STATE_LOITER; + if (_param_loitertime.get() > 0.0f) { + warnx("RC loss, OBC mode, loiter"); + mavlink_log_info(_navigator->get_mavlink_fd(), "#audio: rc loss, loitering"); + _rcl_state = RCL_STATE_LOITER; + } else { + warnx("RC loss, OBC mode, slip loiter, terminate"); + mavlink_log_info(_navigator->get_mavlink_fd(), "#audio: rc loss, terminating"); + _rcl_state = RCL_STATE_TERMINATE; + _navigator->get_mission_result()->stay_in_failsafe = true; + _navigator->publish_mission_result(); + } break; case RCL_STATE_LOITER: _rcl_state = RCL_STATE_TERMINATE; diff --git a/src/modules/navigator/rcloss_params.c b/src/modules/navigator/rcloss_params.c index 83d23cf49..f1a01c73b 100644 --- a/src/modules/navigator/rcloss_params.c +++ b/src/modules/navigator/rcloss_params.c @@ -51,9 +51,10 @@ * Loiter Time * * The amount of time in seconds the system should loiter at current position before termination + * Set to -1 to make the system skip loitering * * @unit seconds - * @min 0.0 + * @min -1.0 * @group RCL */ PARAM_DEFINE_FLOAT(NAV_RCL_LT, 120.0f); |