diff --git a/docs/assets/airframes/multicopter/amovlab_f410/amovlabf410_drone_v1.15.4.params b/docs/assets/airframes/multicopter/amovlab_f410/amovlabf410_drone_v1.15.4.params index 53b68cdeb4..53bb8f5a01 100644 --- a/docs/assets/airframes/multicopter/amovlab_f410/amovlabf410_drone_v1.15.4.params +++ b/docs/assets/airframes/multicopter/amovlab_f410/amovlabf410_drone_v1.15.4.params @@ -325,7 +325,6 @@ 1 1 COM_PREARM_MODE 0 6 1 1 COM_QC_ACT 0 6 1 1 COM_RCL_EXCEPT 0 6 -1 1 COM_RC_ARM_HYST 1000 6 1 1 COM_RC_IN_MODE 3 6 1 1 COM_RC_LOSS_T 0.500000000000000000 9 1 1 COM_RC_OVERRIDE 1 6 diff --git a/docs/en/advanced_config/prearm_arm_disarm.md b/docs/en/advanced_config/prearm_arm_disarm.md index e9e01f180f..ec4ce4c7e2 100644 --- a/docs/en/advanced_config/prearm_arm_disarm.md +++ b/docs/en/advanced_config/prearm_arm_disarm.md @@ -52,19 +52,17 @@ RC controllers will use different sticks for throttle and yaw [based on their mo - _Arm:_ Left-stick to right, right-stick to bottom. - _Disarm:_ Left-stick to left, right-stick to the bottom. -The required hold time can be configured using [COM_RC_ARM_HYST](#COM_RC_ARM_HYST). Note that by default ([COM_DISARM_MAN](#COM_DISARM_MAN)) you can also disarm in flight using gestures/buttons: you may choose to disable this to avoid accidental disarming. | Parameter | Description | | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | | [MAN_ARM_GESTURE](../advanced_config/parameter_reference.md#MAN_ARM_GESTURE) | Enable arm/disarm stick guesture. `0`: Disabled, `1`: Enabled (default). | | [COM_DISARM_MAN](../advanced_config/parameter_reference.md#COM_DISARM_MAN) | Enable disarming in flight via switch/stick/button in MC manual thrust modes. `0`: Disabled, `1`: Enabled (default). | -| [COM_RC_ARM_HYST](../advanced_config/parameter_reference.md#COM_RC_ARM_HYST) | Time that RC stick must be held in arm/disarm position before arming/disarming occurs (default: `1` second). | ## Arming Button/Switch {#arm_disarm_switch} An _arming button_ or "momentary switch" can be configured to trigger arm/disarm _instead_ of [gesture-based arming](#arm_disarm_gestures) (setting an arming switch disables arming gestures). -The button should be held down for ([nominally](#COM_RC_ARM_HYST)) one second to arm (when disarmed) or disarm (when armed). +The button should be held down for one second to arm (when disarmed) or disarm (when armed). A two-position switch can also be used for arming/disarming, where the respective arm/disarm commands are sent on switch _transitions_. @@ -77,7 +75,7 @@ The switch or button is assigned (and enabled) using [RC_MAP_ARM_SW](#RC_MAP_ARM | Parameter | Description | | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | [RC_MAP_ARM_SW](../advanced_config/parameter_reference.md#RC_MAP_ARM_SW) | RC arm switch channel (default: 0 - unassigned). If defined, the specified RC channel (button/switch) is used for arming instead of a stick gesture.
**Note:**
- This setting _disables the stick gesture_!
- This setting applies to RC controllers. It does not apply to Joystick controllers that are connected via _QGroundControl_. | -| [COM_ARM_SWISBTN](../advanced_config/parameter_reference.md#COM_ARM_SWISBTN) | Arm switch is a momentary button.
- `0`: Arm switch is a 2-position switch where arm/disarm commands are sent on switch transitions.
-`1`: Arm switch is a button or momentary button where the arm/disarm command ae sent after holding down button for set time ([COM_RC_ARM_HYST](#COM_RC_ARM_HYST)). | +| [COM_ARM_SWISBTN](../advanced_config/parameter_reference.md#COM_ARM_SWISBTN) | Arm switch is a momentary button.
- `0`: Arm switch is a 2-position switch where arm/disarm commands are sent on switch transitions.
-`1`: Arm switch is a momentary button where the arm/disarm command is sent after holding down the button for one second. | ::: info The switch can also be set as part of _QGroundControl_ [Flight Mode](../config/flight_mode.md) configuration. diff --git a/src/modules/commander/commander_params.c b/src/modules/commander/commander_params.c index e906a3e1f9..0f3a97de4b 100644 --- a/src/modules/commander/commander_params.c +++ b/src/modules/commander/commander_params.c @@ -198,18 +198,6 @@ PARAM_DEFINE_INT32(COM_HOME_IN_AIR, 0); */ PARAM_DEFINE_INT32(COM_RC_IN_MODE, 3); -/** - * Manual control input arm/disarm command duration - * - * The default value of 1000 requires the stick to be held in the arm or disarm position for 1 second. - * - * @group Commander - * @min 100 - * @max 1500 - * @unit ms - */ -PARAM_DEFINE_INT32(COM_RC_ARM_HYST, 1000); - /** * Time-out for auto disarm after landing * @@ -260,8 +248,7 @@ PARAM_DEFINE_INT32(COM_ARM_WO_GPS, 1); * Arm switch is a momentary button * * 0: Arming/disarming triggers on switch transition. - * 1: Arming/disarming triggers when holding the momentary button down - * for COM_RC_ARM_HYST like the stick gesture. + * 1: Arming/disarming triggers when holding the momentary button down like the stick gesture. * * @group Commander * @boolean diff --git a/src/modules/manual_control/ManualControl.cpp b/src/modules/manual_control/ManualControl.cpp index 517639100c..263cbaa027 100644 --- a/src/modules/manual_control/ManualControl.cpp +++ b/src/modules/manual_control/ManualControl.cpp @@ -309,9 +309,9 @@ void ManualControl::updateParams() { ModuleParams::updateParams(); - _stick_arm_hysteresis.set_hysteresis_time_from(false, _param_com_rc_arm_hyst.get() * 1_ms); - _stick_disarm_hysteresis.set_hysteresis_time_from(false, _param_com_rc_arm_hyst.get() * 1_ms); - _button_arm_hysteresis.set_hysteresis_time_from(false, _param_com_rc_arm_hyst.get() * 1_ms); + _stick_arm_hysteresis.set_hysteresis_time_from(false, 1_s); + _stick_disarm_hysteresis.set_hysteresis_time_from(false, 1_s); + _button_arm_hysteresis.set_hysteresis_time_from(false, 1_s); _stick_kill_hysteresis.set_hysteresis_time_from(false, _param_man_kill_gest_t.get() * 1_s); _selector.setRcInMode(_param_com_rc_in_mode.get()); diff --git a/src/modules/manual_control/ManualControl.hpp b/src/modules/manual_control/ManualControl.hpp index 660a125665..42856bb650 100644 --- a/src/modules/manual_control/ManualControl.hpp +++ b/src/modules/manual_control/ManualControl.hpp @@ -148,7 +148,6 @@ private: (ParamFloat) _param_com_rc_stick_ov, (ParamBool) _param_man_arm_gesture, (ParamFloat) _param_man_kill_gest_t, - (ParamInt) _param_com_rc_arm_hyst, (ParamBool) _param_com_arm_swisbtn, (ParamInt) _param_fltmode_1, (ParamInt) _param_fltmode_2,