mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-26 01:35:28 +03:00
Fix local download of hex file (#3182)
This commit is contained in:
parent
3d6a690ccd
commit
bf69053da5
1 changed files with 5 additions and 3 deletions
|
@ -814,6 +814,9 @@ firmware_flasher.initialize = function (callback) {
|
||||||
self.releaseLoader.requestBuild(request, (info) => {
|
self.releaseLoader.requestBuild(request, (info) => {
|
||||||
console.info("Build requested:", info);
|
console.info("Build requested:", info);
|
||||||
|
|
||||||
|
// Complete the summary object to be used later
|
||||||
|
summary.file = info.file;
|
||||||
|
|
||||||
if (!summary.cloudBuild) {
|
if (!summary.cloudBuild) {
|
||||||
// it is a previous release, so simply load the hex
|
// it is a previous release, so simply load the hex
|
||||||
self.releaseLoader.loadTargetHex(info.url, (hex) => onLoadSuccess(hex, info.file), onLoadFailed);
|
self.releaseLoader.loadTargetHex(info.url, (hex) => onLoadSuccess(hex, info.file), onLoadFailed);
|
||||||
|
@ -1008,9 +1011,8 @@ firmware_flasher.initialize = function (callback) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$('span.progressLabel a.save_firmware').click(function () {
|
$('span.progressLabel').on('click', 'a.save_firmware', function () {
|
||||||
const summary = $('select[name="firmware_version"] option:selected').data('summary');
|
chrome.fileSystem.chooseEntry({type: 'saveFile', suggestedName: self.summary.file, accepts: [{description: 'HEX files', extensions: ['hex']}]}, function (fileEntry) {
|
||||||
chrome.fileSystem.chooseEntry({type: 'saveFile', suggestedName: summary.file, accepts: [{description: 'HEX files', extensions: ['hex']}]}, function (fileEntry) {
|
|
||||||
if (checkChromeRuntimeError()) {
|
if (checkChromeRuntimeError()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue