Skip to content

Commit

Permalink
IMPROVEMENT: As per suggestion, one RX protocol, and one Telem protoc…
Browse files Browse the repository at this point in the history
…ol (#3161)
  • Loading branch information
blckmn committed Dec 26, 2022
1 parent 23b74d9 commit 072be2e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 11 deletions.
4 changes: 2 additions & 2 deletions locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -6826,10 +6826,10 @@
"message": "Other Options"
},
"firmwareFlasherBuildRadioProtocols": {
"message": "Radio Protocols"
"message": "Radio Protocol"
},
"firmwareFlasherBuildTelemetryProtocols": {
"message": "Telemetry Protocols"
"message": "Telemetry Protocol"
},
"firmwareFlasherBuildMotorProtocols": {
"message": "Motor Protocols"
Expand Down
2 changes: 1 addition & 1 deletion src/css/tabs/firmware_flasher.less
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@
}
}
}
#branchInfo {
#branchInfo, #radioProtocolInfo, #telemetryProtocolInfo {
.select2-selection__rendered {
line-height: 30px !important;
}
Expand Down
9 changes: 3 additions & 6 deletions src/js/tabs/firmware_flasher.js
Original file line number Diff line number Diff line change
Expand Up @@ -777,29 +777,26 @@ firmware_flasher.initialize = function (callback) {
let request = {
target: summary.target,
release: summary.release,
radioProtocols: [],
telemetryProtocols: [],
motorProtocols: [],
options: [],
classicBuild: false,
};

request.classicBuild = !summary.cloudBuild || $('input[name="classicBuildModeCheckbox"]').is(':checked');
if (!request.classicBuild) {
$('select[name="radioProtocols"] option:selected').each(function () {
request.radioProtocols.push($(this).val());
request.options.push($(this).val());
});

$('select[name="telemetryProtocols"] option:selected').each(function () {
request.telemetryProtocols.push($(this).val());
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());
request.options.push($(this).val());
});

if ($('input[name="expertModeCheckbox"]').is(':checked')) {
Expand Down
4 changes: 2 additions & 2 deletions src/tabs/firmware_flasher.html
Original file line number Diff line number Diff line change
Expand Up @@ -162,15 +162,15 @@
<div style="width: 49%; float: left;">
<strong i18n="firmwareFlasherBuildRadioProtocols"></strong>
<div id="radioProtocolInfo" class="build-options-wrapper">
<select id="radioProtocols" name="radioProtocols" multiple="multiple" class="select2">
<select id="radioProtocols" name="radioProtocols" class="select2">
</select>
<div class="helpicon cf_tip_wide" i18n_title="firmwareFlasherRadioProtocolDescription"></div>
</div>
</div>
<div style="width: 49%; float: right;">
<strong i18n="firmwareFlasherBuildTelemetryProtocols"></strong>
<div id="telemetryProtocolInfo" class="build-options-wrapper">
<select id="telemetryProtocols" name="telemetryProtocols" multiple="multiple" class="select2">
<select id="telemetryProtocols" name="telemetryProtocols" class="select2">
</select>
<div class="helpicon cf_tip_wide" i18n_title="firmwareFlasherTelemetryProtocolDescription"></div>
</div>
Expand Down

0 comments on commit 072be2e

Please sign in to comment.