1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-25 01:05:12 +03:00

Merge branch 'release_7.1.0' into cli_autocomplete

This commit is contained in:
Pawel Spychalski (DzikuVx) 2023-12-26 21:41:43 +01:00
commit 1b4fd4e272
41 changed files with 616 additions and 17313 deletions

39
main.js
View file

@ -130,10 +130,14 @@ $(document).ready(function () {
//Get saved size and position
chrome.storage.local.get('windowSize', function (result) {
if (result.windowSize) {
win.height = result.windowSize.height;
win.width = result.windowSize.width;
win.x = result.windowSize.x;
win.y = result.windowSize.y;
if (result.windowSize.height <= window.screen.availHeight)
win.height = result.windowSize.height;
if (result.windowSize.width <= window.screen.availWidth)
win.width = result.windowSize.width;
if (result.windowSize.x >= window.screen.availLeft)
win.x = result.windowSize.x;
if (result.windowSize.y >= window.screen.availTop)
win.y = result.windowSize.y;
}
});
@ -585,7 +589,6 @@ $(document).ready(function () {
var profile = parseInt($(this).val());
MSP.send_message(MSPCodes.MSP_SELECT_SETTING, [profile], false, function () {
GUI.log(chrome.i18n.getMessage('pidTuning_LoadedProfile', [profile + 1]));
updateActivatedTab();
});
});
@ -595,7 +598,6 @@ $(document).ready(function () {
var batteryprofile = parseInt($(this).val());
MSP.send_message(MSPCodes.MSP2_INAV_SELECT_BATTERY_PROFILE, [batteryprofile], false, function () {
GUI.log(chrome.i18n.getMessage('loadedBatteryProfile', [batteryprofile + 1]));
updateActivatedTab();
});
});
});
@ -735,3 +737,28 @@ function updateFirmwareVersion() {
globalSettings.docsTreeLocation = 'https://github.com/iNavFlight/inav/blob/master/docs/';
}
}
function updateEzTuneTabVisibility(loadMixerConfig) {
let useEzTune = true;
if (CONFIGURATOR.connectionValid) {
if (loadMixerConfig) {
mspHelper.loadMixerConfig(function() {
if (MIXER_CONFIG.platformType == PLATFORM_MULTIROTOR || MIXER_CONFIG.platformType == PLATFORM_TRICOPTER) {
$('.tab_ez_tune').removeClass("is-hidden");
} else {
$('.tab_ez_tune').addClass("is-hidden");
useEzTune = false;
}
});
} else {
if (MIXER_CONFIG.platformType == PLATFORM_MULTIROTOR || MIXER_CONFIG.platformType == PLATFORM_TRICOPTER) {
$('.tab_ez_tune').removeClass("is-hidden");
} else {
$('.tab_ez_tune').addClass("is-hidden");
useEzTune = false;
}
}
}
return useEzTune;
}