From c29f8a79ed84602cfc904d76270e92f69313cd6a Mon Sep 17 00:00:00 2001 From: Raphael Coeffic Date: Sun, 15 Jan 2017 12:22:18 +0100 Subject: [PATCH] use separate serial functions for SmartAudio and Tramp. --- src/main/io/serial.h | 3 ++- src/main/io/vtx_smartaudio.c | 4 ++-- src/main/io/vtx_tramp.c | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main/io/serial.h b/src/main/io/serial.h index b8371cc322..5a68a18041 100644 --- a/src/main/io/serial.h +++ b/src/main/io/serial.h @@ -37,8 +37,9 @@ typedef enum { FUNCTION_BLACKBOX = (1 << 7), // 128 FUNCTION_TELEMETRY_MAVLINK = (1 << 9), // 512 FUNCTION_ESC_SENSOR = (1 << 10), // 1024 - FUNCTION_VTX_CONTROL = (1 << 11), // 2048 + FUNCTION_VTX_SMARTAUDIO = (1 << 11), // 2048 FUNCTION_TELEMETRY_IBUS = (1 << 12), // 4096 + FUNCTION_VTX_TRAMP = (1 << 13), // 8192 } serialPortFunction_e; typedef enum { diff --git a/src/main/io/vtx_smartaudio.c b/src/main/io/vtx_smartaudio.c index a10db12bf7..c3b93077a1 100644 --- a/src/main/io/vtx_smartaudio.c +++ b/src/main/io/vtx_smartaudio.c @@ -652,9 +652,9 @@ bool smartAudioInit() } #endif - serialPortConfig_t *portConfig = findSerialPortConfig(FUNCTION_VTX_CONTROL); + serialPortConfig_t *portConfig = findSerialPortConfig(FUNCTION_VTX_SMARTAUDIO); if (portConfig) { - smartAudioSerialPort = openSerialPort(portConfig->identifier, FUNCTION_VTX_CONTROL, NULL, 4800, MODE_RXTX, SERIAL_BIDIR|SERIAL_BIDIR_PP); + smartAudioSerialPort = openSerialPort(portConfig->identifier, FUNCTION_VTX_SMARTAUDIO, NULL, 4800, MODE_RXTX, SERIAL_BIDIR|SERIAL_BIDIR_PP); } if (!smartAudioSerialPort) { diff --git a/src/main/io/vtx_tramp.c b/src/main/io/vtx_tramp.c index 72fc990e4d..f57a10c8b5 100644 --- a/src/main/io/vtx_tramp.c +++ b/src/main/io/vtx_tramp.c @@ -166,10 +166,10 @@ void trampQueryS(void) bool trampInit() { - serialPortConfig_t *portConfig = findSerialPortConfig(FUNCTION_VTX_CONTROL); + serialPortConfig_t *portConfig = findSerialPortConfig(FUNCTION_VTX_TRAMP); if (portConfig) { - trampSerialPort = openSerialPort(portConfig->identifier, FUNCTION_VTX_CONTROL, NULL, 9600, MODE_RXTX, TRAMP_SERIAL_OPTIONS); + trampSerialPort = openSerialPort(portConfig->identifier, FUNCTION_VTX_TRAMP, NULL, 9600, MODE_RXTX, TRAMP_SERIAL_OPTIONS); } if (!trampSerialPort) {