@@ -2,7 +2,6 @@ local MSP_VTX_CONFIG = 88
2
2
local MSP_VTXTABLE_BAND = 137
3
3
local MSP_VTXTABLE_POWERLEVEL = 138
4
4
5
- local vtxAvailable = true
6
5
local vtxTableAvailable = false
7
6
local vtxConfigReceived = false
8
7
local vtxFrequencyTableReceived = false
@@ -12,7 +11,6 @@ local requestedBand = 1
12
11
local requestedPowerLevel = 1
13
12
local vtxTableConfig = {}
14
13
local frequencyTable = {}
15
- local frequenciesPerBand = 0
16
14
local bandTable = {}
17
15
local powerTable = {}
18
16
@@ -22,7 +20,15 @@ local INTERVAL = 100
22
20
local function processMspReply (cmd , payload , err )
23
21
if cmd == MSP_VTX_CONFIG then
24
22
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
26
32
return
27
33
end
28
34
vtxConfigReceived = true
@@ -118,7 +124,7 @@ local function getVtxTables()
118
124
end
119
125
mspProcessTxQ ()
120
126
processMspReply (mspPollReply ())
121
- return vtxTablesReceived or not vtxAvailable
127
+ return vtxTablesReceived
122
128
end
123
129
124
130
return { f = getVtxTables , t = " Downloading VTX tables" }
0 commit comments