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:
parent
b43ce99849
commit
c39201f698
1 changed files with 3 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue