mirror of
https://github.com/pybricks/pybricks-code.git
synced 2026-09-12 01:23:52 +00:00
hub: change size to little-endian
firmware now expects little endian checksum
This commit is contained in:
+1
-1
@@ -59,7 +59,7 @@ export function downloadAndRun(data: ArrayBuffer): HubThunkAction {
|
||||
// first send payload size as big-endian 32-bit integer
|
||||
const sizeBuf = new Uint8Array(4);
|
||||
const sizeView = new DataView(sizeBuf.buffer);
|
||||
sizeView.setUint32(0, data.byteLength);
|
||||
sizeView.setUint32(0, data.byteLength, true);
|
||||
await dispatch(write(sizeBuf));
|
||||
|
||||
// Then send payload in 100 byte chunks waiting for checksum after
|
||||
|
||||
Reference in New Issue
Block a user