prepare to move to dynamic fixture selection

This commit is contained in:
Morgan Allen 2018-07-29 13:34:17 -07:00
parent 8be54a6858
commit 9e93b06c2a

View file

@ -9,6 +9,9 @@ const portString = "/dev/serial/by-id/usb-Silicon_Labs_CP2102_USB_to_UART_Bridge
const buildPath = path.join(__dirname, "lora32", "build");
const TB_DEV1 = process.env.TB_DEV1 || "0000";
const TB_DEV2 = process.env.TB_DEV2 || "0001";
var args = [
"--chip",
"esp32",
@ -105,20 +108,20 @@ async.series([
async.parallel([
function(done) {
flash(portString.replace("SERIAL_ID", "0001"), done);
flash(portString.replace("SERIAL_ID", TB_DEV1), done);
}, function(done) {
flash(portString.replace("SERIAL_ID", "0002"), done);
flash(portString.replace("SERIAL_ID", TB_DEV2), done);
}], next);
},
function(next) {
async.parallel({
dev1: function(done) {
serial(portString.replace("SERIAL_ID", "0001"), done);
serial(portString.replace("SERIAL_ID", TB_DEV1), done);
},
dev2: function(done) {
serial(portString.replace("SERIAL_ID", "0002"), done);
serial(portString.replace("SERIAL_ID", TB_DEV2), done);
}
}, next);
}