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

Trimmed down RX settings display to save some space on the configuration

tab.
This commit is contained in:
mikeller 2016-10-18 01:18:20 +13:00 committed by Michael Keller
parent 433cc04c0e
commit d05ded8d0e
5 changed files with 79 additions and 100 deletions

View file

@ -410,11 +410,6 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
$('input[name="autodisarmdelay"]').val(ARMING_CONFIG.auto_disarm_delay);
$('input[id="disarmkillswitch"]').prop('checked', ARMING_CONFIG.disarm_kill_switch !== 0);
$('div.disarm').show();
if (BF_CONFIG.features.isEnabled('MOTOR_STOP')) {
$('div.disarmdelay').show();
} else {
$('div.disarmdelay').hide();
}
$('div.cycles').show();
}
@ -447,6 +442,14 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
}
// UI hooks
function checkShowDisarmDelay() {
if (BF_CONFIG.features.isEnabled('MOTOR_STOP')) {
$('div.disarmdelay').show();
} else {
$('div.disarmdelay').hide();
}
}
$('input.feature', features_e).change(function () {
var element = $(this);
@ -454,13 +457,30 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
updateTabList(BF_CONFIG.features);
if (element.attr('name') === 'MOTOR_STOP') {
if (BF_CONFIG.features.isEnabled('MOTOR_STOP')) {
$('div.disarmdelay').show();
} else {
$('div.disarmdelay').hide();
}
checkShowDisarmDelay();
}
});
checkShowDisarmDelay();
function checkShowSerialRxBox() {
if (BF_CONFIG.features.isEnabled('RX_SERIAL')) {
$('div.serialRXBox').show();
} else {
$('div.serialRXBox').hide();
}
}
$(features_e).filter('select').change(function () {
var element = $(this);
BF_CONFIG.features.updateData(element);
updateTabList(BF_CONFIG.features);
if (element.attr('name') === 'rxMode') {
checkShowSerialRxBox();
}
});
checkShowSerialRxBox();
$("input[id='unsyncedPWMSwitch']").change(function() {
if ($(this).is(':checked')) {