From 6cc664683ebb2ab528e4d03c0a12b457c6f2318b Mon Sep 17 00:00:00 2001 From: Jahnkeanater Date: Sat, 14 Oct 2017 02:29:07 -0500 Subject: [PATCH] Fix frequency lookup table. frequency = vtx58frequencyTable[band][channel]; returns the wrong frequency. Shifting left and up by 1 row and column should fix it. --- src/main/io/ledstrip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/io/ledstrip.c b/src/main/io/ledstrip.c index 89ed83e9c..fac3ce452 100644 --- a/src/main/io/ledstrip.c +++ b/src/main/io/ledstrip.c @@ -597,8 +597,8 @@ static void applyLedVtxLayer(bool updateNow, timeUs_t *timer) vtxCommonGetPowerIndex(&power); vtxCommonGetPitMode(&pit); - frequency = vtx58frequencyTable[band][channel]; - + frequency = vtx58frequencyTable[band - 1][channel - 1]; //subtracting 1 from band and channel so that correct frequency is returned. + //might not be correct for tramp but should fix smart audio. // check if last vtx values have changed. check = pit + (power << 1) + (band << 4) + (channel << 8); if (!showSettings && check != lastCheck) {