@@ -2,7 +2,6 @@ local MSP_VTX_CONFIG = 88
22local MSP_VTXTABLE_BAND = 137
33local MSP_VTXTABLE_POWERLEVEL = 138
44
5- local vtxAvailable = true
65local vtxTableAvailable = false
76local vtxConfigReceived = false
87local vtxFrequencyTableReceived = false
@@ -12,7 +11,6 @@ local requestedBand = 1
1211local requestedPowerLevel = 1
1312local vtxTableConfig = {}
1413local frequencyTable = {}
15- local frequenciesPerBand = 0
1614local bandTable = {}
1715local powerTable = {}
1816
@@ -22,7 +20,15 @@ local INTERVAL = 100
2220local function processMspReply (cmd , payload , err )
2321 if cmd == MSP_VTX_CONFIG then
2422 if err then
25- vtxAvailable = false
23+ -- Vtx not available. Create empty vtx table to skip future download attempts
24+ frequencyTable [1 ] = {}
25+ vtxTableConfig .channels = 0
26+ bandTable = { [0 ] = " U" , " 1" }
27+ powerTable = { " LV0" }
28+ vtxConfigReceived = true
29+ vtxTableAvailable = true
30+ vtxFrequencyTableReceived = true
31+ vtxPowerTableReceived = true
2632 return
2733 end
2834 vtxConfigReceived = true
@@ -118,7 +124,7 @@ local function getVtxTables()
118124 end
119125 mspProcessTxQ ()
120126 processMspReply (mspPollReply ())
121- return vtxTablesReceived or not vtxAvailable
127+ return vtxTablesReceived
122128end
123129
124130return { f = getVtxTables , t = " Downloading VTX tables" }
0 commit comments