From 0daed9f7dc42612ac862394ae41977f57c8fedc2 Mon Sep 17 00:00:00 2001 From: Mark Haslinghuis Date: Fri, 16 Feb 2024 19:05:05 +0100 Subject: [PATCH] Update SERIALRX_PROVIDER default (#13371) Add telemetry for FPORT selection --- src/main/pg/rx.c | 24 ++++++++++++++++++++---- src/main/target/common_post.h | 2 +- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/src/main/pg/rx.c b/src/main/pg/rx.c index dace33fe16a..68a1b2ea43c 100644 --- a/src/main/pg/rx.c +++ b/src/main/pg/rx.c @@ -36,12 +36,28 @@ #ifndef SERIALRX_PROVIDER -#if defined(USE_SERIALRX_SBUS) -#define SERIALRX_PROVIDER SERIALRX_SBUS +#if defined(USE_SERIALRX_CRSF) +#define SERIALRX_PROVIDER SERIALRX_CRSF #elif defined(USE_SERIALRX_GHST) #define SERIALRX_PROVIDER SERIALRX_GHST -#elif defined(USE_SERIALRX_CRSF) -#define SERIALRX_PROVIDER SERIALRX_CRSF +#elif defined(USE_SERIALRX_IBUS) +#define SERIALRX_PROVIDER SERIALRX_IBUS +#elif defined(USE_SERIALRX_SBUS) +#define SERIALRX_PROVIDER SERIALRX_SBUS +#elif defined(USE_SERIALRX_SPEKTRUM) +#define SERIALRX_PROVIDER SERIALRX_SPEKTRUM +#elif defined(USE_SERIALRX_FPORT) +#define SERIALRX_PROVIDER SERIALRX_FPORT +#elif defined(USE_SERIALRX_XBUS) +#define SERIALRX_PROVIDER SERIALRX_XBUS +#elif defined(USE_SERIALRX_SRXL2) +#define SERIALRX_PROVIDER SERIALRX_SRXL2 +#elif defined(USE_SERIALRX_JETIEXBUS) +#define SERIALRX_PROVIDER SERIALRX_JETIEXBUS +#elif defined(USE_SERIALRX_SUMD) +#define SERIALRX_PROVIDER SERIALRX_SUMD +#elif defined(USE_SERIALRX_SUMH) +#define SERIALRX_PROVIDER SERIALRX_SUMH #else #define SERIALRX_PROVIDER 0 #endif diff --git a/src/main/target/common_post.h b/src/main/target/common_post.h index 4546ef19c45..83a78c197d9 100644 --- a/src/main/target/common_post.h +++ b/src/main/target/common_post.h @@ -220,6 +220,7 @@ #undef USE_TELEMETRY_MAVLINK #undef USE_TELEMETRY_SMARTPORT #undef USE_TELEMETRY_SRXL +#endif #ifdef USE_SERIALRX_FPORT #ifndef USE_TELEMETRY @@ -229,7 +230,6 @@ #define USE_TELEMETRY_SMARTPORT #endif #endif -#endif #if defined(USE_TELEMETRY_IBUS_EXTENDED) && !defined(USE_TELEMETRY_IBUS) #define USE_TELEMETRY_IBUS