From b00e25247741d93ffa893ca00a025721c62a144e Mon Sep 17 00:00:00 2001 From: blckmn Date: Sat, 5 Nov 2022 13:47:24 +1100 Subject: [PATCH] Fix for VTX and lack of telemetry --- src/main/io/vtx_msp.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/io/vtx_msp.c b/src/main/io/vtx_msp.c index 2a70d8fa0b..d4b2d6fbca 100644 --- a/src/main/io/vtx_msp.c +++ b/src/main/io/vtx_msp.c @@ -92,7 +92,11 @@ static bool isLowPowerDisarmed(void) void setMspVtxDeviceStatusReady(const int descriptor) { if (mspVtxStatus != MSP_VTX_STATUS_READY && vtxTableConfig()->bands && vtxTableConfig()->channels && vtxTableConfig()->powerLevels) { +#if defined(USE_MSP_OVER_TELEMETRY) if (getMspSerialPortDescriptor(mspVtxPortIdentifier) == descriptor || getMspTelemetryDescriptor() == descriptor) { +#else + if (getMspSerialPortDescriptor(mspVtxPortIdentifier) == descriptor) { +#endif mspVtxStatus = MSP_VTX_STATUS_READY; } } @@ -214,7 +218,11 @@ static void vtxMspProcess(vtxDevice_t *vtxDevice, timeUs_t currentTimeUs) DEBUG_SET(DEBUG_VTX_MSP, 0, packetCounter); DEBUG_SET(DEBUG_VTX_MSP, 1, isCrsfPortConfig(portConfig)); DEBUG_SET(DEBUG_VTX_MSP, 2, isLowPowerDisarmed()); +#if defined(USE_MSP_OVER_TELEMETRY) DEBUG_SET(DEBUG_VTX_MSP, 3, isCrsfPortConfig(portConfig) ? getMspTelemetryDescriptor() : getMspSerialPortDescriptor(mspVtxPortIdentifier)); +#else + DEBUG_SET(DEBUG_VTX_MSP, 3, getMspSerialPortDescriptor(mspVtxPortIdentifier)); +#endif } static vtxDevType_e vtxMspGetDeviceType(const vtxDevice_t *vtxDevice)