Skip to content

Commit

Permalink
Continue sync byte renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
mmosca authored Aug 2, 2024
1 parent f7a5af1 commit 124a0d3
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/main/rx/sbus.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ static void sbusDataReceive(uint16_t c, void *data)
sbusFrameData->position = 0;
sbusFrameData->buffer[sbusFrameData->position++] = (uint8_t)c;
sbusFrameData->state = STATE_SBUS_PAYLOAD;
} else if ((uint8_t)c == SBUS26_FRAME_BEGIN_BYTE) {
} else if ((uint8_t)c == SBUS2_HIGHFRAME_BEGIN_BYTE) {
sbusFrameData->position = 0;
sbusFrameData->buffer[sbusFrameData->position++] = (uint8_t)c;
sbusFrameData->state = STATE_SBUS26_PAYLOAD;
Expand Down Expand Up @@ -180,12 +180,6 @@ static void sbusDataReceive(uint16_t c, void *data)
case STATE_SBUS_WAIT_SYNC:
// Stay at this state and do nothing. Exit will be handled before byte is processed if the
// inter-frame gap is long enough
if (c == SBUS26_FRAME_BEGIN_BYTE || c == 0xF2 || c == 0x2c) {
sbusFrameData->position = 0;
sbusFrameData->buffer[sbusFrameData->position++] = (uint8_t)c;
sbusFrameData->state = STATE_SBUS26_PAYLOAD;
}

break;
}
}
Expand Down

0 comments on commit 124a0d3

Please sign in to comment.