Skip to content

Commit da11a65

Browse files
author
Alberto Iannaccone
authored
Support nano rp2040 (#474)
* support nano rp 2040 * 2.4.4
1 parent 5d86d81 commit da11a65

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "arduino-create-agent-js-client",
3-
"version": "2.4.3",
3+
"version": "2.4.4",
44
"description": "JS module providing discovery of the Arduino Create Plugin and communication with it",
55
"main": "lib/index.js",
66
"module": "es/index.js",

src/daemon.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ export default class Daemon {
132132
.then(uploadCommandInfo => {
133133
const projectNameIndex = uploadCommandInfo.commandline.indexOf('{build.project_name}');
134134
let ext = uploadCommandInfo.commandline.substring(projectNameIndex + 21, projectNameIndex + 24);
135+
const data = compilationResult[ext] || compilationResult.bin;
135136
if (!ext || !compilationResult[ext]) {
136137
console.log('we received a faulty ext property, defaulting to .bin');
137138
ext = 'bin';
@@ -141,8 +142,8 @@ export default class Daemon {
141142
...target,
142143
commandline: uploadCommandInfo.commandline,
143144
filename: `${sketchName}.${ext}`,
144-
hex: compilationResult[ext], // For desktop agent
145-
data: compilationResult[ext] // For chromeOS plugin, consider to align this
145+
hex: data, // For desktop agent
146+
data // For chromeOS plugin, consider to align this
146147
};
147148

148149
this.uploadingDone.subscribe(() => {

src/socket-daemon.js

+1
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ export default class SocketDaemon extends Daemon {
213213
this.downloadTool('windows-drivers', 'latest', 'arduino');
214214
this.downloadTool('bossac', '1.7.0', 'arduino');
215215
this.downloadTool('fwupdater', 'latest', 'arduino');
216+
this.downloadTool('rp2040tools', 'latest', 'arduino');
216217
driversRequested = false;
217218
}
218219

0 commit comments

Comments
 (0)