hub: change size to little-endian

firmware now expects little endian checksum
This commit is contained in:
David Lechner
2020-05-04 12:03:34 -05:00
parent c7b7162693
commit 9a64e68c60
+1 -1
View File
@@ -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