From da11a656d13fb42752932c76e320a65c79757540 Mon Sep 17 00:00:00 2001 From: Alberto Iannaccone Date: Thu, 25 Mar 2021 14:28:27 +0100 Subject: [PATCH] Support nano rp2040 (#474) * support nano rp 2040 * 2.4.4 --- package-lock.json | 2 +- package.json | 2 +- src/daemon.js | 5 +++-- src/socket-daemon.js | 1 + 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 117153d3..c5ef32ac 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "arduino-create-agent-js-client", - "version": "2.4.0", + "version": "2.4.4", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 268efe12..047a15bf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "arduino-create-agent-js-client", - "version": "2.4.3", + "version": "2.4.4", "description": "JS module providing discovery of the Arduino Create Plugin and communication with it", "main": "lib/index.js", "module": "es/index.js", diff --git a/src/daemon.js b/src/daemon.js index 9fcde5d9..0407f069 100644 --- a/src/daemon.js +++ b/src/daemon.js @@ -132,6 +132,7 @@ export default class Daemon { .then(uploadCommandInfo => { const projectNameIndex = uploadCommandInfo.commandline.indexOf('{build.project_name}'); let ext = uploadCommandInfo.commandline.substring(projectNameIndex + 21, projectNameIndex + 24); + const data = compilationResult[ext] || compilationResult.bin; if (!ext || !compilationResult[ext]) { console.log('we received a faulty ext property, defaulting to .bin'); ext = 'bin'; @@ -141,8 +142,8 @@ export default class Daemon { ...target, commandline: uploadCommandInfo.commandline, filename: `${sketchName}.${ext}`, - hex: compilationResult[ext], // For desktop agent - data: compilationResult[ext] // For chromeOS plugin, consider to align this + hex: data, // For desktop agent + data // For chromeOS plugin, consider to align this }; this.uploadingDone.subscribe(() => { diff --git a/src/socket-daemon.js b/src/socket-daemon.js index ccd063c0..fbfd83df 100644 --- a/src/socket-daemon.js +++ b/src/socket-daemon.js @@ -213,6 +213,7 @@ export default class SocketDaemon extends Daemon { this.downloadTool('windows-drivers', 'latest', 'arduino'); this.downloadTool('bossac', '1.7.0', 'arduino'); this.downloadTool('fwupdater', 'latest', 'arduino'); + this.downloadTool('rp2040tools', 'latest', 'arduino'); driversRequested = false; }