mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-21 23:35:34 +03:00
Merge pull request #4117 from mikeller/restore_smartport_msp_frame_handling
Restored SmartPort MSP frame handling to how it was before the addition of MSP over CRSF.
This commit is contained in:
commit
0b17f44841
7 changed files with 23 additions and 20 deletions
|
@ -86,12 +86,12 @@ void sendMspErrorResponse(uint8_t error, int16_t cmd)
|
|||
sbufSwitchToReader(&mspPackage.responsePacket->buf, mspPackage.responseBuffer);
|
||||
}
|
||||
|
||||
bool handleMspFrame(uint8_t *frameStart, uint8_t *frameEnd)
|
||||
bool handleMspFrame(uint8_t *frameStart, uint8_t *frameEnd, mspFrameHandling_t handling)
|
||||
{
|
||||
static uint8_t mspStarted = 0;
|
||||
static uint8_t lastSeq = 0;
|
||||
|
||||
if (sbufBytesRemaining(&mspPackage.responsePacket->buf) > 0) {
|
||||
if (handling != MSP_FRAME_HANDLING_FORCED && sbufBytesRemaining(&mspPackage.responsePacket->buf) > 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue