diff --git a/src/main/target/OMNIBUSF7/config.c b/src/main/target/OMNIBUSF7/config.c index 2c0d96708e..aabeb9cae5 100644 --- a/src/main/target/OMNIBUSF7/config.c +++ b/src/main/target/OMNIBUSF7/config.c @@ -29,9 +29,14 @@ #include "io/serial.h" +#ifdef FPVM_BETAFLIGHTF7 +#define ESC_SENSOR_UART SERIAL_PORT_USART1 +#elif defined(OMNIBUSF7V2) +#define ESC_SENSOR_UART SERIAL_PORT_USART7 +#endif + static targetSerialPortFunction_t targetSerialPortFunction[] = { -#if defined(OMNIBUSF7V2) && defined(ESC_SENSOR_UART) - // OMNIBUS F7 V2 has an option to connect UART7_RX to ESC telemetry +#ifdef ESC_SENSOR_UART { ESC_SENSOR_UART, FUNCTION_ESC_SENSOR }, #else { SERIAL_PORT_NONE, FUNCTION_NONE }, diff --git a/src/main/target/OMNIBUSF7/target.h b/src/main/target/OMNIBUSF7/target.h index 2930729243..d9349fcd30 100644 --- a/src/main/target/OMNIBUSF7/target.h +++ b/src/main/target/OMNIBUSF7/target.h @@ -237,12 +237,10 @@ #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT #define SERIALRX_UART SERIAL_PORT_USART6 #define SERIALRX_PROVIDER SERIALRX_SBUS -#define ESC_SENSOR_UART SERIAL_PORT_USART1 #else #define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT #define SERIALRX_UART SERIAL_PORT_USART2 #define SERIALRX_PROVIDER SERIALRX_SBUS -#define ESC_SENSOR_UART SERIAL_PORT_USART7 #endif #define USE_SERIAL_4WAY_BLHELI_INTERFACE