From dd74d95d28c63c0cd7972f8feeacf20a1744c4ea Mon Sep 17 00:00:00 2001 From: matt Date: Thu, 13 Jun 2024 19:48:12 +0200 Subject: [PATCH] swapped length field byte order in write flash packet, fixes mistake in write flash packet (size field) #41 --- js/tool_patcher.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/tool_patcher.js b/js/tool_patcher.js index 9cd3093..2ff67bd 100644 --- a/js/tool_patcher.js +++ b/js/tool_patcher.js @@ -178,7 +178,7 @@ function flash_generateCommand(data, address, totalSize) { const length_msb = 0x01; const length_lsb = 0x00; - return new Uint8Array([0x19, 0x5, 0xc, 0x1, 0x8a, 0x8d, 0x9f, 0x1d, address_msb, address_lsb, address_final_msb, address_final_lsb, length_msb, length_lsb, 0x0, 0x0, ...data]); + return new Uint8Array([0x19, 0x5, 0xc, 0x1, 0x8a, 0x8d, 0x9f, 0x1d, address_msb, address_lsb, address_final_msb, address_final_lsb, length_lsb, length_msb, 0x0, 0x0, ...data]); // notice the inconsistent byte order as observed in the official updater tool } // function to flash the firmware file to the radio