diff --git a/locales/en/messages.json b/locales/en/messages.json index 92563eb1..e545470d 100644 --- a/locales/en/messages.json +++ b/locales/en/messages.json @@ -1840,16 +1840,19 @@ "message": "AND" }, "adjustmentsHelp": { - "message": "Configure adjustment switches. See the 'in-flight adjustments' section of the manual for details. The changes that adjustment functions make are not saved automatically. There are 4 slots. Each switch used to concurrently make adjustments requires exclusive use of a slot." + "message": "Configure adjustment switches. See the 'in-flight adjustments' section of the manual for details. The changes that adjustment functions make are not saved automatically." + }, + "adjustmentSlotsHelp": { + "message": "There are 4 slots. Each switch used to concurrently make adjustments requires exclusive use of a slot." }, "adjustmentsExamples": { - "message": "Examples" + "message": "Examples:" }, "adjustmentsExample1": { - "message": "Use Slot 1 and a 3POS switch on AUX1 to select between Pitch/Roll P, I and D and another 3POS switch on AUX2 to increase or decrease the value when held up or down." + "message": "Use a three position switch on AUX1 to select between Pitch/Roll P, I and D and another three position switch on AUX2 to increase or decrease the value when held up or down." }, "adjustmentsExample2": { - "message": "Use Slot 2 and a 3POS switch on AUX4 to select enable Rate Profile Selection via the same 3POS switch on the same channel." + "message": "Use a three position switch on AUX4 to select enable Rate Profile Selection via the same three position switch on the same channel." }, "adjustmentsColumnEnable": { "message": "If enabled" diff --git a/src/js/tabs/adjustments.js b/src/js/tabs/adjustments.js index face0b03..7e023eb5 100644 --- a/src/js/tabs/adjustments.js +++ b/src/js/tabs/adjustments.js @@ -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,13 @@ TABS.adjustments.initialize = function (callback) { modeTableBodyElement.append(newAdjustment); } + + if (semver.gte(CONFIG.apiVersion, "1.42.0")) { + $('.tab-adjustments .adjustmentSlotsHelp').hide(); + $('.tab-adjustments .adjustmentSlotHeader').hide(); + $('.tab-adjustments .adjustmentSlot').hide(); + } + // translate to user-selected language i18n.localizePage(); @@ -189,8 +198,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], diff --git a/src/tabs/adjustments.html b/src/tabs/adjustments.html index 4cf8260b..4f7770d0 100644 --- a/src/tabs/adjustments.html +++ b/src/tabs/adjustments.html @@ -7,7 +7,8 @@