mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-19 14:25:20 +03:00
Better check for compression method in fc_msp
This commit is contained in:
parent
d4fb9d5bdc
commit
b382c01cc0
1 changed files with 5 additions and 0 deletions
|
@ -310,7 +310,12 @@ static void serializeDataflashReadReply(sbuf_t *dst, uint32_t address, const uin
|
||||||
sbufWriteU32(dst, address);
|
sbufWriteU32(dst, address);
|
||||||
|
|
||||||
// legacy format does not support compression
|
// legacy format does not support compression
|
||||||
|
#ifdef USE_HUFFMAN
|
||||||
const uint8_t compressionMethod = (!allowCompression || useLegacyFormat) ? NO_COMPRESSION : HUFFMAN;
|
const uint8_t compressionMethod = (!allowCompression || useLegacyFormat) ? NO_COMPRESSION : HUFFMAN;
|
||||||
|
#else
|
||||||
|
const uint8_t compressionMethod = NO_COMPRESSION;
|
||||||
|
UNUSED(allowCompression);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (compressionMethod == NO_COMPRESSION) {
|
if (compressionMethod == NO_COMPRESSION) {
|
||||||
if (!useLegacyFormat) {
|
if (!useLegacyFormat) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue