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 RX protocol config #12497

Merged
merged 2 commits into from
Mar 10, 2023
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
6 changes: 5 additions & 1 deletion src/main/pg/rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,17 @@
#include "rx/rx_spi.h"

#ifndef SERIALRX_PROVIDER
blckmn marked this conversation as resolved.
Show resolved Hide resolved

#if defined(USE_SERIALRX_SBUS)
#define SERIALRX_PROVIDER SERIALRX_SBUS
#elif defined(USE_SERIALRX_GHST)
#define SERIALRX_PROVIDER SERIALRX_GHST
#else
#elif defined(USE_SERIALRX_CRSF)
#define SERIALRX_PROVIDER SERIALRX_CRSF
#else
#define SERIALRX_PROVIDER 0
#endif

#endif

PG_REGISTER_WITH_RESET_FN(rxConfig_t, rxConfig, PG_RX_CONFIG, 4);
Expand Down
3 changes: 0 additions & 3 deletions src/main/target/common_defaults_post.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,6 @@
#ifndef RX_SPI_DEFAULT_PROTOCOL
#define RX_SPI_DEFAULT_PROTOCOL 0
#endif
#ifndef SERIALRX_PROVIDER
#define SERIALRX_PROVIDER 0
#endif

#define RX_MIN_USEC 885
#define RX_MAX_USEC 2115
Expand Down