mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-25 17:25:16 +03:00
Removed adjustment range slots from the UI.
This commit is contained in:
parent
5694ac62a8
commit
cf0e78a879
2 changed files with 17 additions and 4 deletions
|
@ -37,8 +37,10 @@ TABS.adjustments.initialize = function (callback) {
|
|||
// update selected slot
|
||||
//
|
||||
|
||||
var adjustmentList = $(newAdjustment).find('.adjustmentSlot .slot');
|
||||
adjustmentList.val(adjustmentRange.slotIndex);
|
||||
if (semver.lt(CONFIG.apiVersion, "1.42.0")) {
|
||||
var adjustmentList = $(newAdjustment).find('.adjustmentSlot .slot');
|
||||
adjustmentList.val(adjustmentRange.slotIndex);
|
||||
}
|
||||
|
||||
//
|
||||
// populate source channel select box
|
||||
|
@ -162,6 +164,12 @@ TABS.adjustments.initialize = function (callback) {
|
|||
modeTableBodyElement.append(newAdjustment);
|
||||
}
|
||||
|
||||
|
||||
if (semver.gte(CONFIG.apiVersion, "1.42.0")) {
|
||||
$('.tab-adjustments .adjustmentSlotHeader').hide();
|
||||
$('.tab-adjustments .adjustmentSlot').hide();
|
||||
}
|
||||
|
||||
// translate to user-selected language
|
||||
i18n.localizePage();
|
||||
|
||||
|
@ -189,8 +197,13 @@ TABS.adjustments.initialize = function (callback) {
|
|||
|
||||
if ($(adjustmentElement).find('.enable').prop("checked")) {
|
||||
var rangeValues = $(this).find('.range .channel-slider').val();
|
||||
var slotIndex = 0;
|
||||
if (semver.lt(CONFIG.apiVersion, "1.42.0")) {
|
||||
slotIndex = parseInt($(this).find('.adjustmentSlot .slot').val());
|
||||
}
|
||||
|
||||
var adjustmentRange = {
|
||||
slotIndex: parseInt($(this).find('.adjustmentSlot .slot').val()),
|
||||
slotIndex: slotIndex,
|
||||
auxChannelIndex: parseInt($(this).find('.channelInfo .channel').val()),
|
||||
range: {
|
||||
start: rangeValues[0],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue