From aaa637f433a71a28e3f5b742e190e131d8d14cf4 Mon Sep 17 00:00:00 2001 From: Josh Stewart Date: Wed, 21 Oct 2020 21:01:53 +1100 Subject: [PATCH] Minor fix for Teensy upload in Windows --- main.js | 4 +++- renderer.js | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index f93d1b7..b71ddb1 100644 --- a/main.js +++ b/main.js @@ -237,11 +237,13 @@ ipcMain.on('uploadFW', (e, args) => { var executableName = __dirname + "/bin/" + platform + "/teensy_post_compile"; executableName = executableName.replace('app.asar',''); //This is important for allowing the binary to be found once the app is packaed into an asar var configName = executableName + ".conf"; - if(process.platform == "win32") { executableName = executableName + '.exe'; } //This must come after the configName line above + var execArgs = ['-board=TEENSY35', '-reboot', '-file='+path.basename(args.firmwareFile, '.hex'), '-path='+path.dirname(args.firmwareFile), '-tools='+executableName.replace('/teensy_post_compile', "")]; //console.log(execArgs); + if(process.platform == "win32") { executableName = executableName + '.exe'; } //This must come after the configName line above + console.log(executableName); const child = execFile(executableName, execArgs); diff --git a/renderer.js b/renderer.js index 29c6189..620f844 100644 --- a/renderer.js +++ b/renderer.js @@ -46,7 +46,7 @@ function refreshSerialPorts() isMega = true; } } - else if(ports[i].vendorId == "16c0") + else if(ports[i].vendorId == "16c0" || ports[i].vendorId == "16C0") { //Teensy if(ports[i].productId == "0483")