From 5fff78136ec1f2abc834641e00888fdfa0c980d1 Mon Sep 17 00:00:00 2001 From: Jan Post Date: Fri, 5 Jan 2024 04:31:30 +0100 Subject: [PATCH] Fix CLI command "bind_rx" for CRSF (#13267) --- src/main/cli/cli.c | 2 +- src/main/rx/rx_bind.c | 4 ++-- src/main/target/common_post.h | 2 +- src/main/target/common_pre.h | 1 - 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/main/cli/cli.c b/src/main/cli/cli.c index 4e2da1a8a..c55afdb38 100644 --- a/src/main/cli/cli.c +++ b/src/main/cli/cli.c @@ -6468,7 +6468,7 @@ const clicmd_t cmdTable[] = { "\t<->[name]", cliBeeper), #endif // USE_BEEPER #if defined(USE_RX_BIND) - CLI_COMMAND_DEF("bind_rx", "initiate binding for RX SPI or SRXL2", NULL, cliRxBind), + CLI_COMMAND_DEF("bind_rx", "initiate binding for RX SPI, SRXL2 or CRSF", NULL, cliRxBind), #endif #if defined(USE_FLASH_BOOT_LOADER) CLI_COMMAND_DEF("bl", "reboot into bootloader", "[flash|rom]", cliBootloader), diff --git a/src/main/rx/rx_bind.c b/src/main/rx/rx_bind.c index f7748340a..2d6904cb9 100644 --- a/src/main/rx/rx_bind.c +++ b/src/main/rx/rx_bind.c @@ -30,7 +30,7 @@ static bool doRxBind(bool doBind) { -#if !defined(USE_SERIALRX_SRXL2) && !defined(USE_RX_FRSKY_SPI) && !defined(USE_RX_SFHSS_SPI) && !defined(USE_RX_FLYSKY) && !defined(USE_RX_SPEKTRUM) && !defined(USE_RX_EXPRESSLRS) && !defined(USE_RX_CRSF) +#if !defined(USE_SERIALRX_SRXL2) && !defined(USE_RX_FRSKY_SPI) && !defined(USE_RX_SFHSS_SPI) && !defined(USE_RX_FLYSKY) && !defined(USE_RX_SPEKTRUM) && !defined(USE_RX_EXPRESSLRS) && !defined(USE_SERIALRX_CRSF) UNUSED(doBind); #endif @@ -41,7 +41,7 @@ static bool doRxBind(bool doBind) switch (rxRuntimeState.serialrxProvider) { default: return false; -#if defined(USE_RX_CRSF) +#if defined(USE_SERIALRX_CRSF) case SERIALRX_CRSF: if (doBind) { crsfRxBind(); diff --git a/src/main/target/common_post.h b/src/main/target/common_post.h index 03ebceefc..2b80ea2d6 100644 --- a/src/main/target/common_post.h +++ b/src/main/target/common_post.h @@ -613,7 +613,7 @@ extern uint8_t __config_end; #endif #endif -#if defined(USE_RX_SPI) || defined(USE_SERIALRX_SRXL2) +#if defined(USE_RX_SPI) || defined(USE_SERIALRX_SRXL2) || defined(USE_SERIALRX_CRSF) #define USE_RX_BIND #endif diff --git a/src/main/target/common_pre.h b/src/main/target/common_pre.h index 694a09442..88a667ed3 100644 --- a/src/main/target/common_pre.h +++ b/src/main/target/common_pre.h @@ -155,7 +155,6 @@ #define USE_RX_SPI #define USE_RX_CC2500 -#define USE_RX_CRSF #define USE_RX_EXPRESSLRS #define USE_RX_SX1280 #define USE_RX_SX127X -- 2.11.4.GIT