Skip to content

Commit

Permalink
retain currentTimeUs, but mark as UNUSED; i think this is more proper…
Browse files Browse the repository at this point in the history
… based on other code.
  • Loading branch information
nerdCopter committed Feb 19, 2024
1 parent 46520d7 commit b781135
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/rx/crsf.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ typedef struct crsfPayloadLinkstatistics_s {
int8_t downlink_SNR;
} crsfLinkStatistics_t;

static void handleCrsfLinkStatisticsFrame(const crsfLinkStatistics_t* statsPtr) {
static void handleCrsfLinkStatisticsFrame(const crsfLinkStatistics_t* statsPtr, timeUs_t currentTimeUs) {
UNUSED(currentTimeUs);
const crsfLinkStatistics_t stats = *statsPtr;
CRSFsetLQ(stats.uplink_Link_quality);
CRSFsetRFMode(stats.rf_Mode);
Expand Down Expand Up @@ -213,7 +214,7 @@ STATIC_UNIT_TESTED void crsfDataReceive(uint16_t c, void *data) {
if ((crsfFrame.frame.deviceAddress == CRSF_ADDRESS_FLIGHT_CONTROLLER) &&
(crsfFrame.frame.frameLength == CRSF_FRAME_ORIGIN_DEST_SIZE + CRSF_FRAME_LINK_STATISTICS_PAYLOAD_SIZE)) {
const crsfLinkStatistics_t* statsFrame = (const crsfLinkStatistics_t*)&crsfFrame.frame.payload;
handleCrsfLinkStatisticsFrame(statsFrame);
handleCrsfLinkStatisticsFrame(statsFrame, currentTimeUs);
}
break;
}
Expand Down

0 comments on commit b781135

Please sign in to comment.