Update: 更新ampy
This commit is contained in:
@@ -130,7 +130,7 @@ class AmpyFS extends FS {
|
||||
let stdout = [], error = null;
|
||||
try {
|
||||
const output = await this.#ampy_.ls(this.#port_, this.#baud_, folderPath);
|
||||
const dirs = Array.from(output.stdout.split('\r\n'));
|
||||
const dirs = Array.from(new Set(output.stdout.split('\r\n')));
|
||||
for (let i in dirs) {
|
||||
if (!dirs[i]) {
|
||||
continue;
|
||||
|
||||
@@ -329,12 +329,10 @@ ArduShell.upload = (boardType, port) => {
|
||||
}
|
||||
ArduShell.runCmd(layerNum, 'upload', cmdStr,
|
||||
function () {
|
||||
setTimeout(() => {
|
||||
mainStatusBarTabs.add('serial', port);
|
||||
mainStatusBarTabs.changeTo(port);
|
||||
const statusBarSerial = mainStatusBarTabs.getStatusBarById(port);
|
||||
statusBarSerial.open();
|
||||
}, 1000);
|
||||
mainStatusBarTabs.add('serial', port);
|
||||
mainStatusBarTabs.changeTo(port);
|
||||
const statusBarSerial = mainStatusBarTabs.getStatusBarById(port);
|
||||
statusBarSerial.open();
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user