From ce2b69843fbedc6b7ec8434477c460c76e5ab9d3 Mon Sep 17 00:00:00 2001 From: J Blackman Date: Sun, 15 Jan 2023 07:24:36 +1100 Subject: [PATCH] Refactor. Core build mode. (#3236) * Refactor. Core build mode. * Be explicit. * Removing example * Removed reference to classic * Updated description. --- locales/ca/messages.json | 4 ++-- locales/da/messages.json | 4 ++-- locales/de/messages.json | 4 ++-- locales/en/messages.json | 8 ++++---- locales/es/messages.json | 4 ++-- locales/fr/messages.json | 4 ++-- locales/gl/messages.json | 2 +- locales/it/messages.json | 4 ++-- locales/ja/messages.json | 4 ++-- locales/ko/messages.json | 4 ++-- locales/pt/messages.json | 4 ++-- src/js/tabs/firmware_flasher.js | 14 ++++++++------ src/tabs/firmware_flasher.html | 27 +++++++++++++-------------- 13 files changed, 44 insertions(+), 43 deletions(-) diff --git a/locales/ca/messages.json b/locales/ca/messages.json index b7f24877..0bc15308 100644 --- a/locales/ca/messages.json +++ b/locales/ca/messages.json @@ -6745,10 +6745,10 @@ "firmwareFlasherBuildCustomDefines": { "message": "Definicions personalitzades" }, - "classicBuild": { + "coreBuild": { "message": "Mode clàssic" }, - "classicBuildModeDescription": { + "coreBuildModeDescription": { "message": "Aquest mode ignora tots els paràmetres aquí. Això bàsicament aconsegueix el mateix que les clàssiques versions intermitjas, i es proporciona per comoditat." } } diff --git a/locales/da/messages.json b/locales/da/messages.json index 62263906..ae432152 100644 --- a/locales/da/messages.json +++ b/locales/da/messages.json @@ -6737,10 +6737,10 @@ "firmwareFlasherBuildCustomDefines": { "message": "Brugertilpasset Defines" }, - "classicBuild": { + "coreBuild": { "message": "Klassisk" }, - "classicBuildModeDescription": { + "coreBuildModeDescription": { "message": "Denne tilstand ignorer alle parametre herunder. Overordnet set er det samme indstilling, som gælder for et natligt byg, og kan anvendes for bekvemmelighed." } } diff --git a/locales/de/messages.json b/locales/de/messages.json index 5c24d215..3197c995 100644 --- a/locales/de/messages.json +++ b/locales/de/messages.json @@ -6622,10 +6622,10 @@ "firmwareFlasherBuildCustomDefines": { "message": "Benutzer-Definitionen" }, - "classicBuild": { + "coreBuild": { "message": "Classic-Modus" }, - "classicBuildModeDescription": { + "coreBuildModeDescription": { "message": "Dieser Modus ignoriert alle hier aufgeführten Parameter. Dies erreicht im Grunde das gleiche wie die Nightlies und dient der Bequemlichkeit." } } diff --git a/locales/en/messages.json b/locales/en/messages.json index d453dc9b..daf48c1f 100644 --- a/locales/en/messages.json +++ b/locales/en/messages.json @@ -6848,10 +6848,10 @@ "firmwareFlasherBuildCustomDefines": { "message": "Custom Defines" }, - "classicBuild": { - "message": "Classic Mode" + "coreBuild": { + "message": "Core Only" }, - "classicBuildModeDescription": { - "message": "This mode ignores all the parameters here. This essentially achieves the same as the classic nightlies, and is provided for convenience." + "coreBuildModeDescription": { + "message": "This option builds a firmware that contains the hardware drivers (and some limited features). It is available to assist in the detection of the hardware on a flight controller, and is provided for that convenience only. Not all features will be available (only hardware) using this option." } } diff --git a/locales/es/messages.json b/locales/es/messages.json index ec9c760c..40d6ee85 100644 --- a/locales/es/messages.json +++ b/locales/es/messages.json @@ -6737,10 +6737,10 @@ "firmwareFlasherBuildCustomDefines": { "message": "Defines personalizados" }, - "classicBuild": { + "coreBuild": { "message": "Modo clásico" }, - "classicBuildModeDescription": { + "coreBuildModeDescription": { "message": "Este modo ignora todos los parámetros de aquí. Básicamente consigue lo mismo que las compilaciones clásicas, y se proporciona por comodidad." } } diff --git a/locales/fr/messages.json b/locales/fr/messages.json index 74c19a2a..70e29194 100644 --- a/locales/fr/messages.json +++ b/locales/fr/messages.json @@ -6734,10 +6734,10 @@ "firmwareFlasherBuildCustomDefines": { "message": "Définitions personnalisées" }, - "classicBuild": { + "coreBuild": { "message": "Mode Classique" }, - "classicBuildModeDescription": { + "coreBuildModeDescription": { "message": "Ce mode ignore tous les paramètres d'ici. Ceci mène au même résultat que les nightlies classiques, fournit par commodité." } } diff --git a/locales/gl/messages.json b/locales/gl/messages.json index 4b450737..35a546b8 100644 --- a/locales/gl/messages.json +++ b/locales/gl/messages.json @@ -6631,7 +6631,7 @@ "firmwareFlasherBuildCustomDefines": { "message": "Definicións personalizadas" }, - "classicBuild": { + "coreBuild": { "message": "Modo clásico" } } diff --git a/locales/it/messages.json b/locales/it/messages.json index 7d41973c..f2e0ad4d 100644 --- a/locales/it/messages.json +++ b/locales/it/messages.json @@ -6737,10 +6737,10 @@ "firmwareFlasherBuildCustomDefines": { "message": "Define Personalizzati" }, - "classicBuild": { + "coreBuild": { "message": "Modalità Classica" }, - "classicBuildModeDescription": { + "coreBuildModeDescription": { "message": "Questa modalità ignora tutti i parametri. Si avrà lo stesso risultato delle classiche build nightly, ed è fornita per comodità." } } diff --git a/locales/ja/messages.json b/locales/ja/messages.json index 970474de..bd02e7b4 100644 --- a/locales/ja/messages.json +++ b/locales/ja/messages.json @@ -6737,10 +6737,10 @@ "firmwareFlasherBuildCustomDefines": { "message": "カスタム定義" }, - "classicBuild": { + "coreBuild": { "message": "クラシックモード" }, - "classicBuildModeDescription": { + "coreBuildModeDescription": { "message": "このモードでは、ここにあるすべてのパラメータが無視されます。これは基本的に古典的なナイトリービルドと同様なことを実現するもので、利便性のために提供されています。" } } diff --git a/locales/ko/messages.json b/locales/ko/messages.json index 5c98c461..31014efc 100644 --- a/locales/ko/messages.json +++ b/locales/ko/messages.json @@ -6737,10 +6737,10 @@ "firmwareFlasherBuildCustomDefines": { "message": "사용자 정의" }, - "classicBuild": { + "coreBuild": { "message": "클래식 모드" }, - "classicBuildModeDescription": { + "coreBuildModeDescription": { "message": "이 모드는 여기의 모든 매개 변수를 무시합니다. 이것은 기본적으로 고전적인 집합체와 동일한 것을 달성하며, 편의를 위해 제공됩니다." } } diff --git a/locales/pt/messages.json b/locales/pt/messages.json index cc3f2559..e596ee4f 100644 --- a/locales/pt/messages.json +++ b/locales/pt/messages.json @@ -6737,10 +6737,10 @@ "firmwareFlasherBuildCustomDefines": { "message": "'Defines' personalizadas" }, - "classicBuild": { + "coreBuild": { "message": "Modo Clássico" }, - "classicBuildModeDescription": { + "coreBuildModeDescription": { "message": "Este modo ignora todos os parâmetros aqui. Isto essencialmente consegue o mesmo que as nightlies clássicas, e é fornecido por conveniência." } } diff --git a/src/js/tabs/firmware_flasher.js b/src/js/tabs/firmware_flasher.js index 142afdba..8ca80333 100644 --- a/src/js/tabs/firmware_flasher.js +++ b/src/js/tabs/firmware_flasher.js @@ -674,12 +674,12 @@ firmware_flasher.initialize = function (callback) { $('input.flash_manual_baud').prop('checked', false); } - $('input.classicbuild_mode').change(function () { + $('input.corebuild_mode').change(function () { const status = $(this).is(':checked'); - $('.hide-in-classic-build-mode').toggle(!status); + $('.hide-in-core-build-mode').toggle(!status); }); - $('input.classicbuild_mode').change(); + $('input.corebuild_mode').change(); // bind UI hook so the status is saved on change $('input.flash_manual_baud').change(function() { @@ -830,14 +830,16 @@ firmware_flasher.initialize = function (callback) { target: targetDetail.target, release: targetDetail.release, options: [], - classicBuild: false, client: { version: CONFIGURATOR.version, }, }; - request.classicBuild = !targetDetail.cloudBuild || $('input[name="classicBuildModeCheckbox"]').is(':checked'); - if (!request.classicBuild) { + const coreBuild = (targetDetail.cloudBuild !== true) || $('input[name="coreBuildModeCheckbox"]').is(':checked'); + if (coreBuild === true) { + request.options.push("CORE_BUILD"); + } else { + request.options.push("CLOUD_BUILD"); $('select[name="radioProtocols"] option:selected').each(function () { request.options.push($(this).val()); }); diff --git a/src/tabs/firmware_flasher.html b/src/tabs/firmware_flasher.html index 72ede583..d70653db 100644 --- a/src/tabs/firmware_flasher.html +++ b/src/tabs/firmware_flasher.html @@ -10,8 +10,8 @@
-
-
@@ -101,7 +101,7 @@
-
+
-
+
@@ -181,7 +181,7 @@
-
+
@@ -201,7 +201,7 @@
-
+
@@ -247,7 +247,7 @@
- +
@@ -271,7 +271,6 @@

-