diff --git a/src/main/fc/mw.c b/src/main/fc/mw.c index db0b280c3..430c217be 100644 --- a/src/main/fc/mw.c +++ b/src/main/fc/mw.c @@ -377,9 +377,9 @@ void mwDisarm(void) } } -#define TELEMETRY_FUNCTION_MASK (FUNCTION_TELEMETRY_FRSKY | FUNCTION_TELEMETRY_HOTT | FUNCTION_TELEMETRY_LTM | FUNCTION_TELEMETRY_SMARTPORT | FUNCTION_TELEMETRY_CRSF) +#define TELEMETRY_FUNCTION_MASK (FUNCTION_TELEMETRY_FRSKY | FUNCTION_TELEMETRY_HOTT | FUNCTION_TELEMETRY_LTM | FUNCTION_TELEMETRY_SMARTPORT) -void releaseSharedTelemetryPorts(void) { +static void releaseSharedTelemetryPorts(void) { serialPort_t *sharedPort = findSharedSerialPort(TELEMETRY_FUNCTION_MASK, FUNCTION_MSP); while (sharedPort) { mspSerialReleasePortIfAllocated(sharedPort); diff --git a/src/main/io/serial.c b/src/main/io/serial.c index 39b19641b..ebc242cc2 100644 --- a/src/main/io/serial.c +++ b/src/main/io/serial.c @@ -209,9 +209,9 @@ serialPort_t *findNextSharedSerialPort(uint16_t functionMask, serialPortFunction } #ifdef TELEMETRY -#define ALL_TELEMETRY_FUNCTIONS_MASK (TELEMETRY_SHAREABLE_PORT_FUNCTIONS_MASK | FUNCTION_TELEMETRY_HOTT | FUNCTION_TELEMETRY_SMARTPORT | FUNCTION_TELEMETRY_MAVLINK | FUNCTION_TELEMETRY_CRSF) +#define ALL_TELEMETRY_FUNCTIONS_MASK (TELEMETRY_SHAREABLE_PORT_FUNCTIONS_MASK | FUNCTION_TELEMETRY_HOTT | FUNCTION_TELEMETRY_SMARTPORT | FUNCTION_TELEMETRY_MAVLINK) #else -#define ALL_TELEMETRY_FUNCTIONS_MASK (FUNCTION_TELEMETRY_FRSKY | FUNCTION_TELEMETRY_HOTT | FUNCTION_TELEMETRY_SMARTPORT | FUNCTION_TELEMETRY_LTM | FUNCTION_TELEMETRY_MAVLINK | FUNCTION_TELEMETRY_CRSF) +#define ALL_TELEMETRY_FUNCTIONS_MASK (FUNCTION_TELEMETRY_FRSKY | FUNCTION_TELEMETRY_HOTT | FUNCTION_TELEMETRY_SMARTPORT | FUNCTION_TELEMETRY_LTM | FUNCTION_TELEMETRY_MAVLINK) #endif #define ALL_FUNCTIONS_SHARABLE_WITH_MSP (FUNCTION_BLACKBOX | ALL_TELEMETRY_FUNCTIONS_MASK) diff --git a/src/main/io/serial.h b/src/main/io/serial.h index 458c45638..ca2f22436 100644 --- a/src/main/io/serial.h +++ b/src/main/io/serial.h @@ -35,10 +35,9 @@ typedef enum { FUNCTION_TELEMETRY_SMARTPORT = (1 << 5), // 32 FUNCTION_RX_SERIAL = (1 << 6), // 64 FUNCTION_BLACKBOX = (1 << 7), // 128 - FUNCTION_PASSTHROUGH = (1 << 8), // 256 + FUNCTION_TELEMETRY_MAVLINK = (1 << 9), // 512 FUNCTION_TELEMETRY_ESC = (1 << 10), // 1024 - FUNCTION_TELEMETRY_CRSF = (1 << 11), // 2048 } serialPortFunction_e; typedef enum { diff --git a/src/main/io/serial_cli.c b/src/main/io/serial_cli.c index 526bcb6cf..f5eb1b484 100755 --- a/src/main/io/serial_cli.c +++ b/src/main/io/serial_cli.c @@ -1421,7 +1421,7 @@ static void cliSerialPassthrough(char *cmdline) if (!mode) mode = MODE_RXTX; - passThroughPort = openSerialPort(id, FUNCTION_PASSTHROUGH, NULL, + passThroughPort = openSerialPort(id, FUNCTION_NONE, NULL, baud, mode, SERIAL_NOT_INVERTED); if (!passThroughPort) {