From e712417cc41fd012e4427f7011e3181561b1b673 Mon Sep 17 00:00:00 2001 From: Martin Budden Date: Wed, 21 Sep 2016 09:03:00 +0100 Subject: [PATCH] Added serialized compression format --- js/msp/MSPHelper.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/msp/MSPHelper.js b/js/msp/MSPHelper.js index f4dfd505..222c0f00 100644 --- a/js/msp/MSPHelper.js +++ b/js/msp/MSPHelper.js @@ -1221,9 +1221,11 @@ MspHelper.prototype.dataflashRead = function(address, blockSize, onDataCallback) var headerSize = 4; var dataSize = response.data.buffer.byteLength - headerSize; + var dataCompressionType = 0; if (semver.gte(CONFIG.flightControllerVersion, "3.1.0")) { - headerSize = headerSize + 2; + headerSize = headerSize + 3; dataSize = response.data.readU16(); + dataCompressionType = response.data.readU8(); } // Verify that the address of the memory returned matches what the caller asked for