mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-20 06:45:16 +03:00
Reset msp handling upon receipt of new incoming frames in msp_shared
This commit is contained in:
parent
9b0e0a4f20
commit
5ccd39843d
8 changed files with 17 additions and 24 deletions
|
@ -86,13 +86,13 @@ void sendMspErrorResponse(uint8_t error, int16_t cmd)
|
|||
sbufSwitchToReader(&mspPackage.responsePacket->buf, mspPackage.responseBuffer);
|
||||
}
|
||||
|
||||
bool handleMspFrame(uint8_t *frameStart, uint8_t *frameEnd, mspFrameHandling_t handling)
|
||||
bool handleMspFrame(uint8_t *frameStart, uint8_t *frameEnd)
|
||||
{
|
||||
static uint8_t mspStarted = 0;
|
||||
static uint8_t lastSeq = 0;
|
||||
|
||||
if (handling != MSP_FRAME_HANDLING_FORCED && sbufBytesRemaining(&mspPackage.responsePacket->buf) > 0) {
|
||||
return false;
|
||||
if (sbufBytesRemaining(&mspPackage.responsePacket->buf) > 0) {
|
||||
mspStarted = 0;
|
||||
}
|
||||
|
||||
if (mspStarted == 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue