From d1b27ab056d35f695b33d1a021d8900a4d69ba61 Mon Sep 17 00:00:00 2001 From: Andreas Antener Date: Mon, 20 Jun 2016 19:23:11 +0200 Subject: [PATCH] moved params NAV_OBL to COM_OBL --- posix-configs/SITL/init/rcS_gazebo_iris | 4 +- src/modules/commander/commander.cpp | 4 +- src/modules/commander/commander_params.c | 54 ++++++++++++++++++------ src/modules/navigator/navigator_params.c | 30 ------------- 4 files changed, 46 insertions(+), 46 deletions(-) diff --git a/posix-configs/SITL/init/rcS_gazebo_iris b/posix-configs/SITL/init/rcS_gazebo_iris index 8e915cea66..47f862fb04 100644 --- a/posix-configs/SITL/init/rcS_gazebo_iris +++ b/posix-configs/SITL/init/rcS_gazebo_iris @@ -24,8 +24,8 @@ param set NAV_DLL_ACT 2 param set COM_DISARM_LAND 3 param set NAV_ACC_RAD 2.0 param set COM_OF_LOSS_T 5 -param set NAV_OBL_ACT 2 -param set NAV_OBL_RC_ACT 0 +param set COM_OBL_ACT 2 +param set COM_OBL_RC_ACT 0 param set RTL_RETURN_ALT 30.0 param set RTL_DESCEND_ALT 5.0 param set RTL_LAND_DELAY 5 diff --git a/src/modules/commander/commander.cpp b/src/modules/commander/commander.cpp index 5f813ec138..c9b50d162a 100644 --- a/src/modules/commander/commander.cpp +++ b/src/modules/commander/commander.cpp @@ -1161,8 +1161,8 @@ int commander_thread_main(int argc, char *argv[]) param_t _param_component_id = param_find("MAV_COMP_ID"); param_t _param_enable_datalink_loss = param_find("NAV_DLL_ACT"); param_t _param_enable_rc_loss = param_find("NAV_RCL_ACT"); - param_t _param_offboard_loss_act = param_find("NAV_OBL_ACT"); - param_t _param_offboard_loss_rc_act = param_find("NAV_OBL_RC_ACT"); + param_t _param_offboard_loss_act = param_find("COM_OBL_ACT"); + param_t _param_offboard_loss_rc_act = param_find("COM_OBL_RC_ACT"); param_t _param_datalink_loss_timeout = param_find("COM_DL_LOSS_T"); param_t _param_rc_loss_timeout = param_find("COM_RC_LOSS_T"); param_t _param_datalink_regain_timeout = param_find("COM_DL_REG_T"); diff --git a/src/modules/commander/commander_params.c b/src/modules/commander/commander_params.c index 3ca993071b..fc9fcf5372 100644 --- a/src/modules/commander/commander_params.c +++ b/src/modules/commander/commander_params.c @@ -276,6 +276,48 @@ PARAM_DEFINE_INT32(COM_DISARM_LAND, 0); */ PARAM_DEFINE_INT32(COM_LOW_BAT_ACT, 0); +/** + * Time-out to wait when offboard connection is lost before triggering offboard lost action. + * See COM_OBL_ACT and COM_OBL_RC_ACT to configure action. + * + * @group Commander + * @unit second + * @min 0 + * @max 60 + * @increment 1 + */ +PARAM_DEFINE_FLOAT(COM_OF_LOSS_T, 0.0f); + +/** + * Set offboard loss failsafe mode + * + * The offboard loss failsafe will only be entered after a timeout, + * set by COM_OF_LOSS_T in seconds. + * + * @value 0 Land at current position + * @value 1 Loiter + * @value 2 Return to Land + * + * @group Mission + */ +PARAM_DEFINE_INT32(COM_OBL_ACT, 0); + +/** + * Set offboard loss failsafe mode when RC is available + * + * The offboard loss failsafe will only be entered after a timeout, + * set by COM_OF_LOSS_T in seconds. + * + * @value 0 Position control + * @value 1 Altitude control + * @value 2 Manual + * @value 3 Return to Land + * @value 4 Land at current position + * + * @group Mission + */ +PARAM_DEFINE_INT32(COM_OBL_RC_ACT, 0); + /** * First flightmode slot (1000-1160) * @@ -413,15 +455,3 @@ PARAM_DEFINE_INT32(COM_FLTMODE5, -1); * @value 12 Follow Me */ PARAM_DEFINE_INT32(COM_FLTMODE6, -1); - -/** - * Time-out to wait when offboard connection is lost before triggering offboard lost action. - * See NAV_OBL_ACT and NAV_OBL_RC_ACT to configure action. - * - * @group Commander - * @unit second - * @min 0 - * @max 60 - * @increment 1 - */ -PARAM_DEFINE_FLOAT(COM_OF_LOSS_T, 0.0f); diff --git a/src/modules/navigator/navigator_params.c b/src/modules/navigator/navigator_params.c index ab923c4850..523f03b42e 100644 --- a/src/modules/navigator/navigator_params.c +++ b/src/modules/navigator/navigator_params.c @@ -104,36 +104,6 @@ PARAM_DEFINE_INT32(NAV_DLL_ACT, 0); */ PARAM_DEFINE_INT32(NAV_RCL_ACT, 0); -/** - * Set offboard loss failsafe mode - * - * The offboard loss failsafe will only be entered after a timeout, - * set by COM_OF_LOSS_T in seconds. - * - * @value 0 Land at current position - * @value 1 Loiter - * @value 2 Return to Land - * - * @group Mission - */ -PARAM_DEFINE_INT32(NAV_OBL_ACT, 0); - -/** - * Set offboard loss failsafe mode when RC is available - * - * The offboard loss failsafe will only be entered after a timeout, - * set by COM_OF_LOSS_T in seconds. - * - * @value 0 Position control - * @value 1 Altitude control - * @value 2 Manual - * @value 3 Return to Land - * @value 4 Land at current position - * - * @group Mission - */ -PARAM_DEFINE_INT32(NAV_OBL_RC_ACT, 0); - /** * Airfield home Lat *