From d3d1a5fd89067ae32d95cc82049b76ee89e4ee17 Mon Sep 17 00:00:00 2001 From: functionpointer Date: Mon, 23 Sep 2019 23:56:05 +0200 Subject: [PATCH] [VTX] Fixed version checks in smartaudio that prevented pitmode from working on SA2.1 devices --- src/main/io/vtx_smartaudio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/io/vtx_smartaudio.c b/src/main/io/vtx_smartaudio.c index 639e4f5f90..6a89b0ca72 100644 --- a/src/main/io/vtx_smartaudio.c +++ b/src/main/io/vtx_smartaudio.c @@ -914,7 +914,7 @@ static void vtxSASetPowerByIndex(vtxDevice_t *vtxDevice, uint8_t index) static void vtxSASetPitMode(vtxDevice_t *vtxDevice, uint8_t onoff) { - if (!(vtxSAIsReady(vtxDevice) && (saDevice.version >= 2))) { + if (!vtxSAIsReady(vtxDevice) || saDevice.version < 2) { return; } @@ -1013,7 +1013,7 @@ static bool vtxSAGetFreq(const vtxDevice_t *vtxDevice, uint16_t *pFreq) static bool vtxSAGetStatus(const vtxDevice_t *vtxDevice, unsigned *status) { - if (!(vtxSAIsReady(vtxDevice) && (saDevice.version == 2))) { + if (!vtxSAIsReady(vtxDevice) || saDevice.version < 2) { return false; }