Merge pull request #295 from martinbudden/bf_serialize_flash

Added serialized flash compression format
10.3.x-maintenance
Michael Keller 2016-10-11 10:28:40 +13:00 committed by GitHub
commit 469b15c3c2
1 changed files with 3 additions and 1 deletions

View File

@ -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