Update: 将xpython板卡工具栏 烧录额外固件 选项与已有 固件烧录 选项合并

This commit is contained in:
王立帮
2024-10-07 23:32:10 +08:00
parent 56204fe160
commit 77b54538fa
3 changed files with 16 additions and 7 deletions

View File

@@ -507,7 +507,7 @@ class App extends Component {
weight: 1 weight: 1
}); });
this.#nav_.register({ /*this.#nav_.register({
icon: 'icon-upload-1', icon: 'icon-upload-1',
id: ['setting', 'firmware'], id: ['setting', 'firmware'],
displayText: Msg.Lang['nav.btn.setting.firmware'], displayText: Msg.Lang['nav.btn.setting.firmware'],
@@ -521,7 +521,7 @@ class App extends Component {
callback: () => BU.burnWithSpecialBin(), callback: () => BU.burnWithSpecialBin(),
scopeType: Nav.Scope.RIGHT, scopeType: Nav.Scope.RIGHT,
weight: 2 weight: 2
}); });*/
this.#nav_.register({ this.#nav_.register({
icon: 'icon-comment-1', icon: 'icon-comment-1',
@@ -535,7 +535,7 @@ class App extends Component {
Url.open(href); Url.open(href);
}, },
scopeType: Nav.Scope.RIGHT, scopeType: Nav.Scope.RIGHT,
weight: 3 weight: 2
}); });
} }

View File

@@ -361,7 +361,12 @@ BU.initBurn = function () {
BU.getDisksWithVolumesName('burn', burn.volume, burn.filePath); BU.getDisksWithVolumesName('burn', burn.volume, burn.filePath);
} else { } else {
const port = Serial.getSelectedPortName(); const port = Serial.getSelectedPortName();
BU.burnWithPort(port, burn.command); if (burn.special && burn.special instanceof Array) {
BU.burning = false;
BU.burnWithSpecialBin();
} else {
BU.burnWithPort(port, burn.command);
}
} }
} }

View File

@@ -129,10 +129,14 @@ BU.initBurn = () => {
if (typeof web.burn.binFile !== 'object') { if (typeof web.burn.binFile !== 'object') {
return; return;
} }
if (boardKey.indexOf('micropython:esp32s2') !== -1) { if (web.burn.special && web.burn.special instanceof Array) {
BU.burnWithAdafruitEsptool(web.burn.binFile); BU.burnWithSpecialBin();
} else { } else {
BU.burnWithEsptool(web.burn.binFile); if (boardKey.indexOf('micropython:esp32s2') !== -1) {
BU.burnWithAdafruitEsptool(web.burn.binFile);
} else {
BU.burnWithEsptool(web.burn.binFile);
}
} }
} }
} }