Skip to content

Commit

Permalink
Fix for CMS feature disabled issue on Spektrum telemetry (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
AndersHoglund authored Apr 26, 2024
1 parent 480cd07 commit eafd3e3
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/main/telemetry/srxl.c
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,10 @@ bool srxlFrameText(sbuf_t *dst, timeUs_t currentTimeUs)
static uint8_t lineNo = 0;
int lineCount = 0;

if (!featureIsEnabled(FEATURE_CMS)) {
return false;
}

// Skip already sent lines...
while (lineSent[lineNo] &&
lineCount < SPEKTRUM_SRXL_DEVICE_TEXTGEN_ROWS) {
Expand All @@ -517,9 +521,6 @@ bool srxlFrameText(sbuf_t *dst, timeUs_t currentTimeUs)
lineSent[lineNo] = true;
lineNo = (lineNo + 1) % SPEKTRUM_SRXL_DEVICE_TEXTGEN_ROWS;

// Always send something, Always one user frame after the two mandatory frames
// I.e. All of the three frame prep routines QOS, RPM, TEXT should always return true
// too keep the "Waltz" sequence intact.
return true;
}
#endif
Expand Down Expand Up @@ -779,7 +780,7 @@ void initSrxlTelemetry(void)
}

#if defined(USE_SPEKTRUM_CMS_TELEMETRY)
if (srxlTelemetryEnabled) {
if (srxlTelemetryEnabled && featureIsEnabled(FEATURE_CMS)) {
srxlDisplayportRegister();
}
#endif
Expand Down

0 comments on commit eafd3e3

Please sign in to comment.