1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-19 14:25:14 +03:00

Add GPS rescue min dth

This commit is contained in:
Hans Christian Olaussen 2021-04-11 16:21:04 +02:00
parent 9ece824971
commit 9c9f53813a
5 changed files with 29 additions and 0 deletions

View file

@ -316,6 +316,12 @@ TABS.failsafe.initialize = function (callback, scrollPosition) {
$('select[name="gps_rescue_altitude_mode"]').closest('.number').hide();
}
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_44)) {
$('input[name="gps_rescue_min_dth"]').val(FC.GPS_RESCUE.minRescueDth);
} else {
$('input[name="gps_rescue_min_dth"]').closest('.number').hide();
}
} else {
// GPS Rescue Parameters not available
$('.pro4 > .proceduresettings').hide();
@ -377,6 +383,10 @@ TABS.failsafe.initialize = function (callback, scrollPosition) {
FC.GPS_RESCUE.altitudeMode = parseInt($('select[name="gps_rescue_altitude_mode"]').val());
}
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_44)) {
FC.GPS_RESCUE.minRescueDth = $('input[name="gps_rescue_min_dth"]').val();
}
function save_failssafe_config() {
MSP.send_message(MSPCodes.MSP_SET_FAILSAFE_CONFIG, mspHelper.crunch(MSPCodes.MSP_SET_FAILSAFE_CONFIG), false, save_rxfail_config);
}