diff --git a/locales/en/messages.json b/locales/en/messages.json index 3fdd3f65..a20b36ce 100644 --- a/locales/en/messages.json +++ b/locales/en/messages.json @@ -4246,13 +4246,13 @@ "message": "Stage 2 - Settings" }, "failsafeDelayItem": { - "message": "Guard time for stage 2 activation after signal lost [1 = 0.1 sec.]" + "message": "Guard time for stage 2 activation after signal lost [seconds]" }, "failsafeDelayHelp": { "message": "Time for stage 1 to wait for recovery" }, "failsafeThrottleLowItem": { - "message": "Failsafe Throttle Low Delay [1 = 0.1 sec.]" + "message": "Failsafe Throttle Low Delay [seconds]" }, "failsafeThrottleLowHelp": { "message": "Just disarm the craft instead of executing the selected failsafe procedure when the throttle was low for this amount of time" @@ -4261,7 +4261,7 @@ "message": "Throttle value used while landing" }, "failsafeOffDelayItem": { - "message": "Delay for turning off the Motors during Failsafe [1 = 0.1 sec.]" + "message": "Delay for turning off the Motors during Failsafe [seconds]" }, "failsafeOffDelayHelp": { "message": "Time to stay in landing mode until the motors are turned off and the craft is disarmed" diff --git a/src/js/tabs/failsafe.js b/src/js/tabs/failsafe.js index 068f4a67..996d4e85 100644 --- a/src/js/tabs/failsafe.js +++ b/src/js/tabs/failsafe.js @@ -249,9 +249,9 @@ TABS.failsafe.initialize = function (callback, scrollPosition) { } $('input[name="failsafe_throttle"]').val(FC.FAILSAFE_CONFIG.failsafe_throttle); - $('input[name="failsafe_off_delay"]').val(FC.FAILSAFE_CONFIG.failsafe_off_delay); - $('input[name="failsafe_throttle_low_delay"]').val(FC.FAILSAFE_CONFIG.failsafe_throttle_low_delay); - $('input[name="failsafe_delay"]').val(FC.FAILSAFE_CONFIG.failsafe_delay); + $('input[name="failsafe_off_delay"]').val((FC.FAILSAFE_CONFIG.failsafe_off_delay / 10.0).toFixed(1)); + $('input[name="failsafe_throttle_low_delay"]').val((FC.FAILSAFE_CONFIG.failsafe_throttle_low_delay / 10.0).toFixed(1)); + $('input[name="failsafe_delay"]').val((FC.FAILSAFE_CONFIG.failsafe_delay / 10.0).toFixed(1)); // set stage 2 failsafe procedure $('input[type="radio"].procedure').change(function () { @@ -345,9 +345,9 @@ TABS.failsafe.initialize = function (callback, scrollPosition) { FC.RX_CONFIG.rx_max_usec = parseInt($('input[name="rx_max_usec"]').val()); FC.FAILSAFE_CONFIG.failsafe_throttle = parseInt($('input[name="failsafe_throttle"]').val()); - FC.FAILSAFE_CONFIG.failsafe_off_delay = parseInt($('input[name="failsafe_off_delay"]').val()); - FC.FAILSAFE_CONFIG.failsafe_throttle_low_delay = parseInt($('input[name="failsafe_throttle_low_delay"]').val()); - FC.FAILSAFE_CONFIG.failsafe_delay = parseInt($('input[name="failsafe_delay"]').val()); + FC.FAILSAFE_CONFIG.failsafe_off_delay = Math.round(10.0 * parseFloat($('input[name="failsafe_off_delay"]').val())); + FC.FAILSAFE_CONFIG.failsafe_throttle_low_delay = Math.round(10.0 * parseFloat($('input[name="failsafe_throttle_low_delay"]').val())); + FC.FAILSAFE_CONFIG.failsafe_delay = Math.round(10.0 * parseFloat($('input[name="failsafe_delay"]').val())); if( $('input[id="land"]').is(':checked')) { FC.FAILSAFE_CONFIG.failsafe_procedure = 0; diff --git a/src/tabs/failsafe.html b/src/tabs/failsafe.html index 24c3937c..383d316f 100644 --- a/src/tabs/failsafe.html +++ b/src/tabs/failsafe.html @@ -77,13 +77,13 @@