Skip to content

Commit

Permalink
Support nano rp2040 (#474)
Browse files Browse the repository at this point in the history
* support nano rp 2040

* 2.4.4
  • Loading branch information
Alberto Iannaccone authored Mar 25, 2021
1 parent 5d86d81 commit da11a65
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
5 changes: 3 additions & 2 deletions src/daemon.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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(() => {
Expand Down
1 change: 1 addition & 0 deletions src/socket-daemon.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit da11a65

Please sign in to comment.