Skip to content

Commit

Permalink
Fix WeDo2.send sends empty message
Browse files Browse the repository at this point in the history
WeDo2.send invokes Base64Util.uint8ArrayToBase64(message). However message.arrayLength === undefined. This causes Base64Util.uint8ArrayToBase64 always returning empty string ''.
  • Loading branch information
tpsnt authored Feb 8, 2024
1 parent 9622516 commit 7fb155a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/extensions/scratch3_wedo2/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,7 @@ class WeDo2 {
return this._ble.write(
BLEService.IO_SERVICE,
uuid,
Base64Util.uint8ArrayToBase64(message),
Base64Util.uint8ArrayToBase64(new Uint8Array(message)),
'base64'
);
}
Expand Down

0 comments on commit 7fb155a

Please sign in to comment.