1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-17 05:15:21 +03:00

Added serialized compression format

This commit is contained in:
Martin Budden 2016-09-21 09:03:00 +01:00
parent 23a7acb0e5
commit e712417cc4

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