added an rc switch for arming and disarming with the option to use it as a button

This commit is contained in:
Matthias Grob
2016-12-20 09:46:36 +01:00
committed by Lorenz Meier
parent 537f72073d
commit aa984edd90
8 changed files with 108 additions and 5 deletions
+46
View File
@@ -2488,6 +2488,34 @@ PARAM_DEFINE_INT32(RC_MAP_OFFB_SW, 0);
*/
PARAM_DEFINE_INT32(RC_MAP_KILL_SW, 0);
/**
* Arm switch channel
*
* @min 0
* @max 18
* @group Radio Switches
* @value 0 Unassigned
* @value 1 Channel 1
* @value 2 Channel 2
* @value 3 Channel 3
* @value 4 Channel 4
* @value 5 Channel 5
* @value 6 Channel 6
* @value 7 Channel 7
* @value 8 Channel 8
* @value 9 Channel 9
* @value 10 Channel 10
* @value 11 Channel 11
* @value 12 Channel 12
* @value 13 Channel 13
* @value 14 Channel 14
* @value 15 Channel 15
* @value 16 Channel 16
* @value 17 Channel 17
* @value 18 Channel 18
*/
PARAM_DEFINE_INT32(RC_MAP_ARM_SW, 0);
/**
* Flaps channel
*
@@ -2985,6 +3013,24 @@ PARAM_DEFINE_FLOAT(RC_OFFB_TH, 0.5f);
*/
PARAM_DEFINE_FLOAT(RC_KILLSWITCH_TH, 0.25f);
/**
* Threshold for the arm switch
*
* 0-1 indicate where in the full channel range the threshold sits
* 0 : min
* 1 : max
* sign indicates polarity of comparison
* positive : true when channel>th
* negative : true when channel<th
*
* @min -1
* @max 1
* @group Radio Switches
*
*
*/
PARAM_DEFINE_FLOAT(RC_ARMSWITCH_TH, 0.25f);
/**
* Threshold for the VTOL transition switch
*