@@ -2,7 +2,8 @@ local apiVersionReceived = false
2
2
local vtxTablesReceived = false
3
3
local mcuIdReceived = false
4
4
local boardInfoReceived = false
5
- local getApiVersion , getVtxTables , getMCUId , getBoardInfo
5
+ local featuresReceived = false
6
+ local getApiVersion , getVtxTables , getMCUId , getBoardInfo , getFeaturesInfo
6
7
local returnTable = { f = nil , t = " " }
7
8
8
9
local function init ()
@@ -56,10 +57,18 @@ local function init()
56
57
getBoardInfo = nil
57
58
collectgarbage ()
58
59
end
60
+ elseif not featuresReceived and apiVersion >= 1.41 then
61
+ getFeaturesInfo = getFeaturesInfo or assert (loadScript (" features_info.lua" ))()
62
+ returnTable .t = getFeaturesInfo .t
63
+ featuresReceived = getFeaturesInfo .f ()
64
+ if featuresReceived then
65
+ getFeaturesInfo = nil
66
+ collectgarbage ()
67
+ end
59
68
else
60
69
return true
61
70
end
62
- return apiVersionReceived and vtxTablesReceived and mcuId and boardInfoReceived
71
+ return apiVersionReceived and vtxTablesReceived and mcuId and boardInfoReceived and featuresReceived
63
72
end
64
73
65
74
returnTable .f = init
0 commit comments