Skip to content

Commit

Permalink
Fix CRC algo for FrSky S.Port and F.Port
Browse files Browse the repository at this point in the history
  • Loading branch information
shellixyz authored and McGiverGim committed Dec 22, 2022
1 parent cc98c09 commit a593f83
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/main/rx/fport.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,18 +239,6 @@ static void smartPortWriteFrameFport(const smartPortPayload_t *payload)
}
#endif

static bool checkChecksum(uint8_t *data, uint8_t length)
{
uint16_t checksum = 0;
for (unsigned i = 0; i < length; i++) {
checksum = checksum + *(uint8_t *)(data + i);
}

checksum = (checksum & 0xff) + (checksum >> 8);

return checksum == FPORT_CRC_VALUE;
}

static uint8_t fportFrameStatus(rxRuntimeState_t *rxRuntimeState)
{
static bool hasTelemetryRequest = false;
Expand Down

0 comments on commit a593f83

Please sign in to comment.