Skip to content

Commit 4346cbf

Browse files
MrMabulousmrmabulous
andauthored
Changed esp32 OTA upload command (#85)
* Changed esp32 OTA upload command to use "espota" instead of "espota.py" under windows and macOS. * Changed OTA upload under macOS to use python script. * Updated comments in code to reflect previous changes. --------- Co-authored-by: mrmabulous <[email protected]>
1 parent 4c74c4c commit 4346cbf

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/extension.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -500,18 +500,18 @@ export function activate(context: vscode.ExtensionContext) {
500500
}
501501
} else if (esp32) {
502502
if (network) {
503-
let espota = "tools" + path.sep + "espota.py";
503+
let espota = "tools" + path.sep + "espota";
504504
let espotaPath = findTool(arduinoContext, "runtime.platform.path");
505505
if (espotaPath) {
506506
espota = espotaPath + path.sep + espota;
507507
}
508508
uploadOpts = ["-r", "-i", serialPort, "-p", String(networkPort), "-f", imageFile, "-s"];
509509

510-
if ((platform() === 'win32') || (platform() === 'darwin')) {
511-
cmdApp = espota; // Have binary EXE on Mac/Windows
510+
if (platform() === 'win32') {
511+
cmdApp = espota; // Have binary EXE on Windows
512512
} else {
513-
cmdApp = "python3"; // Not shipped, assumed installed on Linux
514-
uploadOpts.unshift(espota); // Need to call Python3
513+
cmdApp = "python3"; // Not shipped, assumed installed on Linux and MacOS
514+
uploadOpts.unshift(espota + ".py"); // Need to call Python3
515515
}
516516
} else {
517517
let flashMode = arduinoContext.boardDetails.buildProperties["build.flash_mode"];

0 commit comments

Comments
 (0)