Skip to content

Commit 124a0d3

Browse files
authored
Continue sync byte renaming
1 parent f7a5af1 commit 124a0d3

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/main/rx/sbus.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ static void sbusDataReceive(uint16_t c, void *data)
9595
sbusFrameData->position = 0;
9696
sbusFrameData->buffer[sbusFrameData->position++] = (uint8_t)c;
9797
sbusFrameData->state = STATE_SBUS_PAYLOAD;
98-
} else if ((uint8_t)c == SBUS26_FRAME_BEGIN_BYTE) {
98+
} else if ((uint8_t)c == SBUS2_HIGHFRAME_BEGIN_BYTE) {
9999
sbusFrameData->position = 0;
100100
sbusFrameData->buffer[sbusFrameData->position++] = (uint8_t)c;
101101
sbusFrameData->state = STATE_SBUS26_PAYLOAD;
@@ -180,12 +180,6 @@ static void sbusDataReceive(uint16_t c, void *data)
180180
case STATE_SBUS_WAIT_SYNC:
181181
// Stay at this state and do nothing. Exit will be handled before byte is processed if the
182182
// inter-frame gap is long enough
183-
if (c == SBUS26_FRAME_BEGIN_BYTE || c == 0xF2 || c == 0x2c) {
184-
sbusFrameData->position = 0;
185-
sbusFrameData->buffer[sbusFrameData->position++] = (uint8_t)c;
186-
sbusFrameData->state = STATE_SBUS26_PAYLOAD;
187-
}
188-
189183
break;
190184
}
191185
}

0 commit comments

Comments
 (0)