diff --git a/main.js b/main.js index 39208d5..2f0fe99 100644 --- a/main.js +++ b/main.js @@ -90,7 +90,7 @@ ipcMain.on('download', (e, args) => { fullFile = dlDir + "/" + filename; //Special case for handling the build that is from master. This is ALWAYS downloaded as there's no way of telling when it was last updated. - if(filename == "master.hex" || filename == "master.ini") + if(filename.includes("master")) { if(fs.existsSync(fullFile)) { diff --git a/renderer.js b/renderer.js index 02e6be8..05aaf7b 100644 --- a/renderer.js +++ b/renderer.js @@ -395,18 +395,15 @@ function downloadHex(board) var DLurl; switch(board) { case "TEENSY35": - if(e.options[e.selectedIndex].value == 'master') { DLurl = "http://speeduino.com/fw/teensy35/" + e.options[e.selectedIndex].value + ".hex"; } - else { DLurl = "http://speeduino.com/fw/teensy35/" + e.options[e.selectedIndex].value + "-teensy35.hex"; } + DLurl = "http://speeduino.com/fw/teensy35/" + e.options[e.selectedIndex].value + "-teensy35.hex"; console.log("Downloading Teensy 35 firmware: " + DLurl); break; case "TEENSY36": - if(e.options[e.selectedIndex].value == 'master') { DLurl = "http://speeduino.com/fw/teensy36/" + e.options[e.selectedIndex].value + ".hex"; } - else { DLurl = "http://speeduino.com/fw/teensy36/" + e.options[e.selectedIndex].value + "-teensy36.hex"; } + DLurl = "http://speeduino.com/fw/teensy36/" + e.options[e.selectedIndex].value + "-teensy36.hex"; console.log("Downloading Teensy 36 firmware: " + DLurl); break; case "TEENSY41": - if(e.options[e.selectedIndex].value == 'master') { DLurl = "http://speeduino.com/fw/teensy41/" + e.options[e.selectedIndex].value + ".hex"; } - else { DLurl = "http://speeduino.com/fw/teensy41/" + e.options[e.selectedIndex].value + "-teensy41.hex"; } + DLurl = "http://speeduino.com/fw/teensy41/" + e.options[e.selectedIndex].value + "-teensy41.hex"; console.log("Downloading Teensy 41 firmware: " + DLurl); break; case "ATMEGA2560":