1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-15 20:35:23 +03:00

Change failsafe delays units to seconds in UI

This commit is contained in:
Ivan Efimov 2022-04-07 20:21:33 -05:00
parent 04b4c7438c
commit 8fb0961701
3 changed files with 12 additions and 12 deletions

View file

@ -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"

View file

@ -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;

View file

@ -77,13 +77,13 @@
<div class="helpicon cf_tip" i18n_title="failsafeKillSwitchHelp"></div>
</div>
<div class="number stage2">
<label> <input type="number" name="failsafe_delay" min="0" max="200" /> <span
<label> <input type="number" name="failsafe_delay" min="0" max="200" step="0.1" /> <span
i18n="failsafeDelayItem"></span>
</label>
<div class="helpicon cf_tip" i18n_title="failsafeDelayHelp"></div>
</div>
<div class="number stage2">
<label> <input type="number" name="failsafe_throttle_low_delay" min="0" max="300" /> <span
<label> <input type="number" name="failsafe_throttle_low_delay" min="0" max="300" step="0.1" /> <span
i18n="failsafeThrottleLowItem"></span>
</label>
<div class="helpicon cf_tip" i18n_title="failsafeThrottleLowHelp"></div>
@ -106,7 +106,7 @@
</label>
</div>
<div class="number">
<label> <input type="number" name="failsafe_off_delay" min="0" max="200" /> <span
<label> <input type="number" name="failsafe_off_delay" min="0" max="200" step="0.1" /> <span
i18n="failsafeOffDelayItem"></span>
</label>
<div class="helpicon cf_tip" i18n_title="failsafeOffDelayHelp"></div>