From c5d0da51345fa7144385abf7a242c41681e33e52 Mon Sep 17 00:00:00 2001 From: "Pawel Spychalski (DzikuVx)" Date: Sat, 2 Jul 2022 13:26:23 +0200 Subject: Version bump --- manifest.json | 2 +- package-lock.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/manifest.json b/manifest.json index 91bef066..b22eff2c 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 2, "minimum_chrome_version": "38", - "version": "5.0.0", + "version": "5.1.0", "author": "Several", "name": "INAV - Configurator", "short_name": "INAV", diff --git a/package-lock.json b/package-lock.json index ebca696a..0ba87d8a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "inav-configurator", - "version": "5.0.0", + "version": "5.1.0", "lockfileVersion": 2, "requires": true, "packages": { -- cgit v1.2.3 From d81a992dc259a29a4df36372df37819de6133a5a Mon Sep 17 00:00:00 2001 From: Darren Lines Date: Sun, 3 Jul 2022 13:53:48 +0100 Subject: Fixes to the modes page - Moved to turn assist in to **flight mode modifiers** section. As it applies to fixed wing and multirotors. - Re-established name changes for `CAMERA CONTROL` 1 to 3 when a RunCam Device is used. --- js/peripherals.js | 5 ++--- src/css/tabs/auxiliary.css | 6 +++++- tabs/auxiliary.js | 11 +++++++---- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/js/peripherals.js b/js/peripherals.js index 2c340fb5..3029fdfd 100644 --- a/js/peripherals.js +++ b/js/peripherals.js @@ -25,8 +25,7 @@ function adjustBoxNameIfPeripheralWithModeID(modeId, defaultName) { default: return defaultName; } - } - - return defaultName; + } + return defaultName; } \ No newline at end of file diff --git a/src/css/tabs/auxiliary.css b/src/css/tabs/auxiliary.css index 86ff9acf..724f6758 100644 --- a/src/css/tabs/auxiliary.css +++ b/src/css/tabs/auxiliary.css @@ -81,18 +81,22 @@ background-color: #e4e4e4; border-bottom: 5px solid white; color: grey; - min-width: 100px; + height: 85px; + width: 130px; + padding: 0px 5px; } .tab-auxiliary .mode .info .name { font-weight: bold; font-size: 1.0em; + padding-bottom: 5px; } .tab-auxiliary .mode .info .buttons { position: absolute; bottom: 14px; width: 100%; + margin-left:-5px; } .tab-auxiliary .mode .info .buttons a { diff --git a/tabs/auxiliary.js b/tabs/auxiliary.js index 55dbe25f..af2ab460 100644 --- a/tabs/auxiliary.js +++ b/tabs/auxiliary.js @@ -18,7 +18,11 @@ TABS.auxiliary.initialize = function (callback) { } function get_rc_data() { - MSP.send_message(MSPCodes.MSP_RC, false, false, load_html); + MSP.send_message(MSPCodes.MSP_RC, false, false, get_ports_data); + } + + function get_ports_data() { + MSP.send_message(MSPCodes.MSP2_CF_SERIAL_CONFIG, false, false, load_html); } function load_html() { @@ -33,8 +37,8 @@ TABS.auxiliary.initialize = function (callback) { modeSections["Arming"] = ["ARM", "PREARM"]; modeSections["Flight Modes"] = ["ANGLE", "HORIZON", "MANUAL"]; modeSections["Navigation Modes"] = ["NAV COURSE HOLD", "NAV CRUISE", "NAV POSHOLD", "NAV RTH", "NAV WP", "GCS NAV"]; - modeSections["Flight Mode Modifiers"] = ["NAV ALTHOLD", "HEADING HOLD", "AIR MODE", "SOARING", "SURFACE"]; - modeSections["Fixed Wing"] = ["AUTO TUNE", "SERVO AUTOTRIM", "AUTO LEVEL", "NAV LAUNCH", "LOITER CHANGE", "FLAPERON", "TURN ASSIST"]; + modeSections["Flight Mode Modifiers"] = ["NAV ALTHOLD", "HEADING HOLD", "AIR MODE", "SOARING", "SURFACE", "TURN ASSIST"]; + modeSections["Fixed Wing"] = ["AUTO TUNE", "SERVO AUTOTRIM", "AUTO LEVEL", "NAV LAUNCH", "LOITER CHANGE", "FLAPERON"]; modeSections["Multi-rotor"] = ["FPV ANGLE MIX", "TURTLE", "MC BRAKING", "HEADFREE", "HEADADJ"]; modeSections["OSD Modes"] = ["OSD OFF", "OSD ALT 1", "OSD ALT 2", "OSD ALT 3"]; modeSections["FPV Camera Modes"] = ["CAMSTAB", "CAMERA CONTROL 1", "CAMERA CONTROL 2", "CAMERA CONTROL 3"]; @@ -201,7 +205,6 @@ TABS.auxiliary.initialize = function (callback) { let modeSelectionRange = ""; for (var modeIndex = 0; modeIndex < AUX_CONFIG.length; modeIndex++) { - // Get current mode category for (modeSelectionRange in modeSections) { if (modeSections[modeSelectionRange].indexOf(AUX_CONFIG[modeIndex]) != -1) { -- cgit v1.2.3 From 8f028852e032fdd18aee025d0aa8e05237aacec2 Mon Sep 17 00:00:00 2001 From: Darren Lines Date: Sun, 3 Jul 2022 14:07:26 +0100 Subject: Update auxiliary.js Added if statement to stop unnecessarily loading ports --- tabs/auxiliary.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tabs/auxiliary.js b/tabs/auxiliary.js index af2ab460..adb4dc61 100644 --- a/tabs/auxiliary.js +++ b/tabs/auxiliary.js @@ -18,7 +18,11 @@ TABS.auxiliary.initialize = function (callback) { } function get_rc_data() { - MSP.send_message(MSPCodes.MSP_RC, false, false, get_ports_data); + if (SERIAL_CONFIG.ports.length == 0) { + MSP.send_message(MSPCodes.MSP_RC, false, false, get_ports_data); + } else { + MSP.send_message(MSPCodes.MSP_RC, false, false, load_html); + } } function get_ports_data() { -- cgit v1.2.3 From 0ec56ce234d6e08a5e69449abb1ce247ba6fe9a2 Mon Sep 17 00:00:00 2001 From: Darren Lines Date: Wed, 13 Jul 2022 21:25:01 +0100 Subject: Hide switch indicators settings when DJI is used On Hide unused elements: - Remove switch indicators settings - Tidy removal of switch indicator elements --- tabs/osd.html | 2 +- tabs/osd.js | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/tabs/osd.html b/tabs/osd.html index a46a56dc..15d11839 100644 --- a/tabs/osd.html +++ b/tabs/osd.html @@ -243,7 +243,7 @@ -
+
diff --git a/tabs/osd.js b/tabs/osd.js index b789095e..babb9b28 100644 --- a/tabs/osd.js +++ b/tabs/osd.js @@ -493,6 +493,7 @@ OSD.DjiElements = { "Timers", "VTX", "CRSF", + "SwitchIndicators", "GVars", "PIDs", "PIDOutputs", @@ -2571,6 +2572,8 @@ OSD.GUI.updateDjiView = function(on) { $(element).hide(); } }); + + $('.switch-indicator-container').hide(); } else { $(OSD.DjiElements.emptyGroups).each(function(index, groupName) { $('#osdGroup' + groupName).show(); @@ -2583,6 +2586,8 @@ OSD.GUI.updateDjiView = function(on) { $('.settings-container, .alarms-container').find('.settings').children() .show() .removeClass('no-bottom'); + + $('.switch-indicator-container').show(); } OSD.GUI.updateDjiMessageElements($('#useCraftnameForMessages').is(':checked')); }; -- cgit v1.2.3 From 0fc38fefd346dcc370225e12ea363eac561c3c69 Mon Sep 17 00:00:00 2001 From: Darren Lines Date: Thu, 14 Jul 2022 21:12:06 +0100 Subject: Changes and fix to rounding Fixes #1564, fixes #1567 - Fixed discovered rounding error for float parameters. - Altered step for converted units based on the multiplier. - Default step now stored in the element data, so that the default decimal places are always known and used when saving. --- js/settings.js | 72 +++++++++++++++++++++++++++++++++------------------- tabs/pid_tuning.html | 2 +- 2 files changed, 47 insertions(+), 27 deletions(-) diff --git a/js/settings.js b/js/settings.js index ccc06d10..3fa510f5 100644 --- a/js/settings.js +++ b/js/settings.js @@ -156,19 +156,20 @@ var Settings = (function () { let dataStep = input.data("step"); - if (dataStep !== undefined) { - input.attr('step', dataStep); - } else { - input.attr('step', "0.01"); + if (typeof dataStep === 'undefined') { + dataStep = self.countDecimals(s.value); + dataStep = 1 / Math.pow(10, dataStep); + input.data("step", dataStep); } + input.attr('step', dataStep); input.attr('min', s.setting.min); input.attr('max', s.setting.max); - input.val(s.value.toFixed(2)); - + input.val(s.value.toFixed(self.countDecimals(dataStep))); } else { var multiplier = parseFloat(input.data('setting-multiplier') || 1); + input.data("step", 1); input.val((s.value / multiplier).toFixed(Math.log10(multiplier))); input.attr('type', 'number'); if (typeof s.setting.min !== 'undefined' && s.setting.min !== null) { @@ -381,7 +382,7 @@ var Settings = (function () { 'm-lrg' : 'mi', 'cms' : 'mph', 'v-cms' : 'fts', - 'decadegps' : 'degpd', + 'decadegps' : 'degps', 'decideg' : 'deg', 'decideg-lrg' : 'deg', 'msec' : 'sec', @@ -427,38 +428,33 @@ var Settings = (function () { const multiplier = multiObj.multiplier; const unitName = multiObj.unitName; + let decimalPlaces = 0; // Update the step, min, and max; as we have the multiplier here. if (element.attr('type') == 'number') { - let step = element.attr('step') || 1; - let decimalPlaces = 0; - - step = step / multiplier; + let step = parseFloat(element.attr('step')) || 1; - if (step < 1) { - decimalPlaces = step.toString().length - step.toString().indexOf(".") - 1; - if (parseInt(step.toString().slice(-1)) > 1 ) { - decimalPlaces--; - } + if (multiplier !== 1) { + decimalPlaces = Math.min(Math.ceil(multiplier / 100), 3); step = 1 / Math.pow(10, decimalPlaces); } element.attr('step', step.toFixed(decimalPlaces)); - if (multiplier != 'FAHREN') { - element.attr('min', (element.attr('min') / multiplier).toFixed(decimalPlaces)); - element.attr('max', (element.attr('max') / multiplier).toFixed(decimalPlaces)); + if (multiplier !== 'FAHREN' && multiplier !== 1) { + element.attr('min', (parseFloat(element.attr('min')) / multiplier).toFixed(decimalPlaces)); + element.attr('max', (parseFloat(element.attr('max')) / multiplier).toFixed(decimalPlaces)); } } // Update the input with a new formatted unit let newValue = ""; - if (multiplier == 'FAHREN') { - element.attr('min', toFahrenheit(element.attr('min')).toFixed(2)); - element.attr('max', toFahrenheit(element.attr('max')).toFixed(2)); - newValue = toFahrenheit(oldValue).toFixed(2); + if (multiplier === 'FAHREN') { + element.attr('min', toFahrenheit(element.attr('min')).toFixed(decimalPlaces)); + element.attr('max', toFahrenheit(element.attr('max')).toFixed(decimalPlaces)); + newValue = toFahrenheit(oldValue).toFixed(decimalPlaces); } else { - const convertedValue = Number((oldValue / multiplier).toFixed(2)); - newValue = Number.isInteger(convertedValue) ? Math.round(convertedValue) : convertedValue; + newValue = Number((oldValue / multiplier)).toFixed(decimalPlaces); } + element.val(newValue); element.data('setting-multiplier', multiplier); @@ -493,12 +489,36 @@ var Settings = (function () { value = Math.round(((parseFloat(input.val())-32) / 1.8) * 10); } else { multiplier = parseFloat(multiplier); - value = Math.round(parseFloat(input.val()) * multiplier); + + let presicion = input.data("step") || 1; // data-step is always based on the default firmware units. + presicion = self.countDecimals(presicion); + + if (presicion === 0) { + value = Math.round(parseFloat(input.val()) * multiplier); + } else { + value = Math.round((parseFloat(input.val()) * multiplier) * Math.pow(10, presicion)) / Math.pow(10, presicion); + } } } + return mspHelper.setSetting(settingName, value); }; + self.countDecimals = function(value) { + let text = value.toString() + // verify if number 0.000005 is represented as "5e-6" + if (text.indexOf('e-') > -1) { + let [base, trail] = text.split('e-'); + let deg = parseInt(trail, 10); + return deg; + } + // count decimals for number in representation like "0.123456" + if (Math.floor(value) !== value) { + return value.toString().split(".")[1].length || 0; + } + return 0; + }; + self.saveInputs = function() { var inputs = []; $('[data-setting!=""][data-setting]').each(function() { diff --git a/tabs/pid_tuning.html b/tabs/pid_tuning.html index eb2dd329..0f1fafb6 100644 --- a/tabs/pid_tuning.html +++ b/tabs/pid_tuning.html @@ -496,7 +496,7 @@ -
+
-- cgit v1.2.3 From bd70d431c01810f9f06a47aeacbba862a8509a8f Mon Sep 17 00:00:00 2001 From: Darren Lines Date: Fri, 29 Jul 2022 14:18:30 +0100 Subject: Add version number to CLI save This PR adds the version number to the CLI filename. It also adds a secondary way to get the data from the FC if it is out of range. If it fails, it appears as the previous save filename looked. --- js/helpers.js | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/js/helpers.js b/js/helpers.js index 8b611898..cf8930c4 100644 --- a/js/helpers.js +++ b/js/helpers.js @@ -42,13 +42,28 @@ function generateFilename(prefix, suffix) { if (CONFIG) { if (CONFIG.flightControllerIdentifier) { - filename = CONFIG.flightControllerIdentifier + '_' + filename; - } + filename = CONFIG.flightControllerIdentifier + '_' + CONFIG.flightControllerVersion + "_" + filename; + } if (CONFIG.name && CONFIG.name.trim() !== '') { filename = filename + '_' + CONFIG.name.trim().replace(' ', '_'); } + } else { + // Attempt to get the version number and + MSPHelper.getSetting("version").then(function (data) { + if (data.value) { + let version = data.value.split('/')[0] + "_" + data.value.split(' ')[1]; + filename = "" + version + "_" + filename; + } + }); + + MSPHelper.getSetting("name").then(function (data) { + if (data.value && data.value.trim() !== '') { + filename += "_" + data.value.trim().replace(' ', '_'); + } + }); } + filename = filename + '_' + date.getFullYear() + zeroPad(date.getMonth() + 1, 2) + zeroPad(date.getDate(), 2) -- cgit v1.2.3 From 4feecd937568b4be739426b34667fdc00873ece3 Mon Sep 17 00:00:00 2001 From: b14ckyy <33039058+b14ckyy@users.noreply.github.com> Date: Fri, 29 Jul 2022 21:20:58 +0200 Subject: Updated Plane presets for better AHI Drift mitigation --- js/defaults_dialog.js | 44 ++++++++++++++++++++++++++++++++++---------- 1 file changed, 34 insertions(+), 10 deletions(-) diff --git a/js/defaults_dialog.js b/js/defaults_dialog.js index 19bca033..0e7918b9 100644 --- a/js/defaults_dialog.js +++ b/js/defaults_dialog.js @@ -287,19 +287,23 @@ helper.defaultsDialog = (function () { }, { key: "nav_fw_pos_z_p", - value: 15 + value: 25 }, { - key: "nav_fw_pos_z_d", + key: "nav_fw_pos_z_i", value: 5 }, + { + key: "nav_fw_pos_z_d", + value: 8 + }, { key: "nav_fw_pos_xy_p", - value: 60 + value: 55 }, { key: "fw_turn_assist_pitch_gain", - value: 0.5 + value: 0.4 }, { key: "max_angle_inclination_rll", @@ -359,11 +363,19 @@ helper.defaultsDialog = (function () { }, { key: "imu_acc_ignore_rate", - value: 9 + value: 7 }, { key: "imu_acc_ignore_slope", - value: 5 + value: 4 + }, + { + key: "imu_dcm_kp", + value: 1000 + }, + { + key: "imu_dcm_ki", + value: 0 }, { key: "airmode_type", @@ -486,19 +498,23 @@ helper.defaultsDialog = (function () { }, { key: "nav_fw_pos_z_p", - value: 15 + value: 35 }, { - key: "nav_fw_pos_z_d", + key: "nav_fw_pos_z_i", value: 5 }, + { + key: "nav_fw_pos_z_d", + value: 10 + }, { key: "nav_fw_pos_xy_p", - value: 60 + value: 70 }, { key: "fw_turn_assist_pitch_gain", - value: 0.2 + value: 0.3 }, { key: "max_angle_inclination_rll", @@ -564,6 +580,14 @@ helper.defaultsDialog = (function () { key: "imu_acc_ignore_slope", value: 5 }, + { + key: "imu_dcm_kp", + value: 1000 + }, + { + key: "imu_dcm_ki", + value: 0 + }, { key: "airmode_type", value: "STICK_CENTER_ONCE" -- cgit v1.2.3 From 8b68ec5ef2ba60721676fa50c653e55e188830df Mon Sep 17 00:00:00 2001 From: b14ckyy <33039058+b14ckyy@users.noreply.github.com> Date: Fri, 29 Jul 2022 22:03:27 +0200 Subject: Cleanup Autolaunch settings Removed Settings (should not be changed by user, but kept in CLI): Launch Velocity Launch Accel Launch Detect Time Moved Launch and Idle throttle together --- tabs/advanced_tuning.html | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/tabs/advanced_tuning.html b/tabs/advanced_tuning.html index ef8d3806..62976393 100644 --- a/tabs/advanced_tuning.html +++ b/tabs/advanced_tuning.html @@ -10,6 +10,11 @@
+
+ + +
+
@@ -27,21 +32,6 @@
-
- - -
-
-
- - -
-
-
- - -
-
@@ -56,11 +46,6 @@
-
-
- - -
-- cgit v1.2.3 From 5dce3958810dd61c0abfae4209febbc1a927a011 Mon Sep 17 00:00:00 2001 From: b14ckyy <33039058+b14ckyy@users.noreply.github.com> Date: Fri, 29 Jul 2022 22:33:05 +0200 Subject: Added usable autolaunch settings to presets --- js/defaults_dialog.js | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/js/defaults_dialog.js b/js/defaults_dialog.js index 19bca033..e3e77bff 100644 --- a/js/defaults_dialog.js +++ b/js/defaults_dialog.js @@ -393,6 +393,22 @@ helper.defaultsDialog = (function () { key: "nav_wp_radius", value: 5000 }, + { + key: "nav_fw_launch_max_angle", + value: 90 + }, + { + key: "nav_fw_launch_motor_delay", + value: 100 + }, + { + key: "nav_fw_launch_max_altitude", + value: 5000 + }, + { + key: "nav_fw_launch_climb_angle", + value: 25 + }, ], "features": [ { @@ -592,6 +608,22 @@ helper.defaultsDialog = (function () { key: "nav_wp_radius", value: 5000 }, + { + key: "nav_fw_launch_max_angle", + value: 90 + }, + { + key: "nav_fw_launch_motor_delay", + value: 100 + }, + { + key: "nav_fw_launch_max_altitude", + value: 5000 + }, + { + key: "nav_fw_launch_climb_angle", + value: 25 + }, ], "features": [ { -- cgit v1.2.3 From ec468bbf81bc43266da4ec4258c25ffbae41a4e2 Mon Sep 17 00:00:00 2001 From: b14ckyy <33039058+b14ckyy@users.noreply.github.com> Date: Fri, 29 Jul 2022 22:37:10 +0200 Subject: moved launch throttle back to old order --- tabs/advanced_tuning.html | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/tabs/advanced_tuning.html b/tabs/advanced_tuning.html index 62976393..ea98b6d6 100644 --- a/tabs/advanced_tuning.html +++ b/tabs/advanced_tuning.html @@ -10,23 +10,16 @@
-
- - -
-
-
-
@@ -47,6 +40,11 @@
+
+ + +
+
-- cgit v1.2.3 From 16e3c6a951d3671adf07f9bf3c577b64ca2a7832 Mon Sep 17 00:00:00 2001 From: Darren Lines Date: Sun, 31 Jul 2022 22:08:28 +0100 Subject: Updated text - Modernised the example flight controllers - Commented out the line about **Auto-Connect** as inav doesn't auto-connect. It can be uncommented if auto-connect is implemented. --- _locales/en/messages.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index a0663a96..bb841705 100755 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -2210,7 +2210,7 @@ "message": "Warning" }, "firmwareFlasherWarningText": { - "message": "Please do not try to flash non-iNAV hardware with this firmware flasher.
Do not disconnect the board or turn off your computer while flashing.

Note: STM32 bootloader is stored in ROM, it cannot be bricked.
Note: Auto-Connect is always disabled while you are inside firmware flasher.
Note: Make sure you have a backup; some upgrades/downgrades will wipe your configuration.
Note: If you have problems flashing try disconnecting all cables from your FC first, try rebooting, upgrade chrome, upgrade drivers.
Note: When flashing boards that have directly connected USB sockets (SPRacingF3Mini, Sparky, ColibriRace, etc) ensure you have read the USB Flashing section of the INAV manual and have the correct software and drivers installed" + "message": "Please do not try to flash non-iNAV hardware with this firmware flasher.
Do not disconnect the board or turn off your computer while flashing.

Note: STM32 bootloader is stored in ROM, it cannot be bricked.
Note: Make sure you have a backup; some upgrades/downgrades will wipe your configuration.
Note: If you have problems flashing try disconnecting all cables from your FC first, try rebooting, upgrade chrome, upgrade drivers.
Note: When flashing boards that have directly connected USB sockets (Matek H743-SLIM, Holybro Kakute etc) ensure you have read the USB Flashing section of the INAV manual and have the correct software and drivers installed" }, "firmwareFlasherRecoveryHead": { "message": "Recovery / Lost communication" -- cgit v1.2.3 From beb9cf5775ff20770ae33465c04c6d73169f61e5 Mon Sep 17 00:00:00 2001 From: b14ckyy <33039058+b14ckyy@users.noreply.github.com> Date: Thu, 11 Aug 2022 14:22:14 +0200 Subject: Update defaults_dialog.js --- js/defaults_dialog.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/defaults_dialog.js b/js/defaults_dialog.js index e3e77bff..5bcbbbfd 100644 --- a/js/defaults_dialog.js +++ b/js/defaults_dialog.js @@ -395,7 +395,7 @@ helper.defaultsDialog = (function () { }, { key: "nav_fw_launch_max_angle", - value: 90 + value: 45 }, { key: "nav_fw_launch_motor_delay", @@ -610,7 +610,7 @@ helper.defaultsDialog = (function () { }, { key: "nav_fw_launch_max_angle", - value: 90 + value: 75 }, { key: "nav_fw_launch_motor_delay", -- cgit v1.2.3 From b8485457dd41a4704728745928f2d732c3e88cea Mon Sep 17 00:00:00 2001 From: Darren Lines Date: Sat, 13 Aug 2022 19:40:38 +0100 Subject: Fixed and enhanced LC display --- js/fc.js | 2 +- js/gui.js | 6 ++++-- js/logicCondition.js | 3 ++- js/logicConditionsCollection.js | 4 ++++ tabs/mixer.js | 1 + tabs/programming.js | 1 - 6 files changed, 12 insertions(+), 5 deletions(-) diff --git a/js/fc.js b/js/fc.js index 5ad7275a..4c862d39 100644 --- a/js/fc.js +++ b/js/fc.js @@ -1249,7 +1249,7 @@ var FC = { 4: { name: "Logic Condition", type: "range", - range: [0, 31], + range: [0, (LOGIC_CONDITIONS.getMaxLogicConditionCount()-1)], default: 0 }, 5: { diff --git a/js/gui.js b/js/gui.js index 301abf71..83b5307f 100644 --- a/js/gui.js +++ b/js/gui.js @@ -300,7 +300,7 @@ GUI_control.prototype.renderOperandValue = function ($container, operandMetadata * @param {function} onChange * @param {boolean} withAlways */ -GUI_control.prototype.renderLogicConditionSelect = function ($container, logicConditions, current, onChange, withAlways) { +GUI_control.prototype.renderLogicConditionSelect = function ($container, logicConditions, current, onChange, withAlways, onlyEnabled) { let $select = $container.append('').find("select"), lcCount = logicConditions.getCount(); + option = ""; if (withAlways) { $select.append('') } for (let i = 0; i < lcCount ; i++) { - if (!onlyEnabled || (logicConditions.isEnabled(i))) { - $select.append(''); + if (!onlyEnabled || i === current || (logicConditions.isEnabled(i))) { + option = 'Logic Condition ' + i + ' '; + + $select.append(option); } } diff --git a/main.css b/main.css index 1c13dbf8..f2e47013 100644 --- a/main.css +++ b/main.css @@ -2010,6 +2010,10 @@ select { padding: 1px; } +.lc_disabled { + color: #aaa; +} + .ic_osd { background-image: url("../images/icons/icon_osd.svg"); background-position-y: 4px; -- cgit v1.2.3 From dac6ff3616b250778747482a047a449f27ed0c32 Mon Sep 17 00:00:00 2001 From: Darren Lines Date: Mon, 15 Aug 2022 18:02:07 +0100 Subject: Removed MSP parts --- js/helpers.js | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/js/helpers.js b/js/helpers.js index cf8930c4..914fbbaa 100644 --- a/js/helpers.js +++ b/js/helpers.js @@ -43,27 +43,13 @@ function generateFilename(prefix, suffix) { if (CONFIG) { if (CONFIG.flightControllerIdentifier) { filename = CONFIG.flightControllerIdentifier + '_' + CONFIG.flightControllerVersion + "_" + filename; - } + } + if (CONFIG.name && CONFIG.name.trim() !== '') { filename = filename + '_' + CONFIG.name.trim().replace(' ', '_'); } - } else { - // Attempt to get the version number and - MSPHelper.getSetting("version").then(function (data) { - if (data.value) { - let version = data.value.split('/')[0] + "_" + data.value.split(' ')[1]; - filename = "" + version + "_" + filename; - } - }); - - MSPHelper.getSetting("name").then(function (data) { - if (data.value && data.value.trim() !== '') { - filename += "_" + data.value.trim().replace(' ', '_'); - } - }); } - filename = filename + '_' + date.getFullYear() + zeroPad(date.getMonth() + 1, 2) + zeroPad(date.getDate(), 2) -- cgit v1.2.3 From a22e0a59c9f741384df620fff6d502d0fb8ee9f7 Mon Sep 17 00:00:00 2001 From: "Pawel Spychalski (DzikuVx)" Date: Mon, 22 Aug 2022 10:56:33 +0200 Subject: fix version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ad08f73c..2fd4e4d9 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "inav-configurator", "description": "INAV Configurator", - "version": "5.0.0", + "version": "5.1.0", "main": "main.html", "default_locale": "en", "scripts": { -- cgit v1.2.3