Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CLI command "bind_rx" for CRSF #13267

Merged
merged 2 commits into from Jan 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main/cli/cli.c
Expand Up @@ -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),
Expand Down
4 changes: 2 additions & 2 deletions src/main/rx/rx_bind.c
Expand Up @@ -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

Expand All @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion src/main/target/common_post.h
Expand Up @@ -612,7 +612,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

Expand Down
1 change: 0 additions & 1 deletion src/main/target/common_pre.h
Expand Up @@ -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
Expand Down