PX4/Firmware — pull request #840 by TickTock- (2014-04-19 22:03:11+00:00)
Title: Failsafe mapping and mode switch thresholds

1) Added rc_map_failsafe parameter to enable mapping an rc function other than throttle as the failsafe channel
2) Added parameters to enable customization of the mode switches. Each represents the threshold at which the switch changes from the default state as defined in the flight modes. A negative value may be entered to change the polarity of the comparison (if negative will output true when the mapped channel is below the threshold). Switch channels are scaled to range from 0 to 1 (used to range from -1 to 1) so a threshold of 0.5 is right in the middle of the full channel range. An entry of -0.5 is also in the middle, but will result in a true condition when the channel is below midscale. Default values result in standard switch behavior (tested).
i. RC_ASSISTED_TH (default = 0.25)
ii. RC_AUTO_TH (default = 0.75)
iii. RC_EASY_TH (default = 0.5)
iv. RC_RTL_TH (default = 0.5)
v. RC_LOITER_TH (default = 0.5)

To implement a custom setup with two 3pos switches, the values can be changed to {0.25,0.75,0.75,-0.25,0.75} (tested)

A rotary switch might look something like {0.25, 0.5, 0.375, 0.75, -0.625} (untested)