mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-23 16:25:22 +03:00
Adding ability to specify a classic build (#3087)
* Adding ability to specify a classic build This means a user rather than using cloud options, can simply get all options (same as previous unified nightlies). * Corrected means to enable/disable.
This commit is contained in:
parent
6b78f369fd
commit
0064747f30
3 changed files with 46 additions and 12 deletions
|
@ -647,6 +647,17 @@ firmware_flasher.initialize = function (callback) {
|
|||
$('input.flash_manual_baud').prop('checked', false);
|
||||
}
|
||||
|
||||
$('input.classicbuild_mode').change(function () {
|
||||
const status = $(this).is(':checked');
|
||||
|
||||
$('select[name="radioProtocols"]').attr('disabled', status);
|
||||
$('select[name="telemetryProtocols"]').attr('disabled', status);
|
||||
$('select[name="motorProtocols"]').attr('disabled', status);
|
||||
$('select[name="options"]').attr('disabled', status);
|
||||
$('input[name="customDefines"]').attr('disabled', status);
|
||||
});
|
||||
$('input.classicbuild_mode').change();
|
||||
|
||||
// bind UI hook so the status is saved on change
|
||||
$('input.flash_manual_baud').change(function() {
|
||||
const status = $(this).is(':checked');
|
||||
|
@ -778,23 +789,27 @@ firmware_flasher.initialize = function (callback) {
|
|||
telemetryProtocols: [],
|
||||
motorProtocols: [],
|
||||
options: [],
|
||||
classicBuild: false,
|
||||
};
|
||||
|
||||
$('select[name="radioProtocols"] option:selected').each(function () {
|
||||
request.radioProtocols.push($(this).val());
|
||||
});
|
||||
request.classicBuild = $('input[name="classicBuildModeCheckbox"]').is(':checked');
|
||||
if (!request.classicBuild) {
|
||||
$('select[name="radioProtocols"] option:selected').each(function () {
|
||||
request.radioProtocols.push($(this).val());
|
||||
});
|
||||
|
||||
$('select[name="telemetryProtocols"] option:selected').each(function () {
|
||||
request.telemetryProtocols.push($(this).val());
|
||||
});
|
||||
$('select[name="telemetryProtocols"] option:selected').each(function () {
|
||||
request.telemetryProtocols.push($(this).val());
|
||||
});
|
||||
|
||||
$('select[name="options"] option:selected').each(function () {
|
||||
request.options.push($(this).val());
|
||||
});
|
||||
$('select[name="options"] option:selected').each(function () {
|
||||
request.options.push($(this).val());
|
||||
});
|
||||
|
||||
$('select[name="motorProtocols"] option:selected').each(function () {
|
||||
request.motorProtocols.push($(this).val());
|
||||
});
|
||||
$('select[name="motorProtocols"] option:selected').each(function () {
|
||||
request.motorProtocols.push($(this).val());
|
||||
});
|
||||
}
|
||||
|
||||
if (summary.releaseType === "Unstable") {
|
||||
request.commit = $('select[name="commits"] option:selected').val();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue