Made failsafe more intuitive. Default (0) maps to whatever channel is throttle. If a non-zero value is entered, a direct channel map is used so use

This commit is contained in:
TickTock-
2014-04-22 23:19:04 -07:00
parent 81c03154b9
commit 971e8fc4ff
2 changed files with 8 additions and 20 deletions
+4 -1
View File
@@ -1379,7 +1379,10 @@ Sensors::rc_poll()
signal_lost = false;
/* check failsafe */
int8_t fs_ch = _rc.function[_parameters.rc_map_failsafe];
int8_t fs_ch = _rc.function[_parameters.rc_map_failsafe]; // get channel mapped to throttle
if (_parameters.rc_map_failsafe>0){ // if not 0, use channel number instead of rc.function mapping
fs_ch = _parameters.rc_map_failsafe - 1;
}
if (_parameters.rc_fails_thr > 0 && fs_ch >= 0) {
/* failsafe configured */
if ((_parameters.rc_fails_thr < _parameters.min[fs_ch] && rc_input.values[fs_ch] < _parameters.rc_fails_thr) ||