forked from Archive/PX4-Autopilot
commander: Added a parameter to control the timeout period for disarming after the kill switch is engaged. (#13325)
This commit is contained in:
parent
1896c758d0
commit
b943bd72ab
|
@ -558,7 +558,6 @@ Commander::Commander() :
|
|||
_failure_detector(this)
|
||||
{
|
||||
_auto_disarm_landed.set_hysteresis_time_from(false, _param_com_disarm_preflight.get() * 1_s);
|
||||
_auto_disarm_killed.set_hysteresis_time_from(false, 5_s);
|
||||
|
||||
// We want to accept RC inputs as default
|
||||
status.rc_input_mode = vehicle_status_s::RC_IN_MODE_DEFAULT;
|
||||
|
@ -1549,6 +1548,8 @@ Commander::run()
|
|||
|
||||
param_get(_param_takeoff_finished_action, &takeoff_complete_act);
|
||||
|
||||
_auto_disarm_killed.set_hysteresis_time_from(false, _param_com_kill_disarm.get() * 1_s);
|
||||
|
||||
/* check for unsafe Airmode settings: yaw airmode requires the use of an arming switch */
|
||||
if (_param_airmode != PARAM_INVALID && _param_rc_map_arm_switch != PARAM_INVALID) {
|
||||
param_get(_param_airmode, &airmode);
|
||||
|
|
|
@ -149,6 +149,8 @@ private:
|
|||
(ParamInt<px4::params::COM_PREARM_MODE>) _param_com_prearm_mode,
|
||||
(ParamInt<px4::params::COM_MOT_TEST_EN>) _param_com_mot_test_en,
|
||||
|
||||
(ParamFloat<px4::params::COM_KILL_DISARM>) _param_com_kill_disarm,
|
||||
|
||||
(ParamInt<px4::params::CBRK_SUPPLY_CHK>) _param_cbrk_supply_chk,
|
||||
(ParamInt<px4::params::CBRK_USB_CHK>) _param_cbrk_usb_chk,
|
||||
(ParamInt<px4::params::CBRK_AIRSPD_CHK>) _param_cbrk_airspd_chk,
|
||||
|
|
|
@ -977,3 +977,14 @@ PARAM_DEFINE_INT32(COM_PREARM_MODE, 1);
|
|||
* @group Commander
|
||||
*/
|
||||
PARAM_DEFINE_INT32(COM_MOT_TEST_EN, 1);
|
||||
|
||||
/**
|
||||
* Timeout value for disarming when kill switch is engaged
|
||||
*
|
||||
* @group Commander
|
||||
* @unit s
|
||||
* @min 0.0
|
||||
* @max 30.0
|
||||
* @increment 0.1
|
||||
*/
|
||||
PARAM_DEFINE_FLOAT(COM_KILL_DISARM, 5.0f);
|
Loading…
Reference in New Issue