1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-25 17:25:20 +03:00

Pad error reply with 0s + bug fixes.

This commit is contained in:
Raphael Coeffic 2016-10-27 16:07:04 +02:00
parent b43ce99849
commit c39201f698

View file

@ -443,10 +443,13 @@ bool smartPortSendMspReply()
if (smartPortMspReply.result == MSP_RESULT_ERROR) {
*p++ |= SMARTPORT_MSP_ERROR_FLAG;
*p++ = SMARTPORT_MSP_ERROR;
*p++ = SMARTPORT_MSP_ERROR ^ smartPortMspReply.cmd; // MSP checksum
while (p < end) *p++ = 0; // pad with zeros
smartPortSendPackageEx(FSSP_MSPS_FRAME,packet);
return false;
}
p++;
*p++ = size;
checksum = size ^ smartPortMspReply.cmd;
}