mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-19 14:25:14 +03:00
Refactor. Core build mode. (#3236)
* Refactor. Core build mode. * Be explicit. * Removing example * Removed reference to classic * Updated description.
This commit is contained in:
parent
d9e119f275
commit
ce2b69843f
13 changed files with 44 additions and 43 deletions
|
@ -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());
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue