@@ -4,13 +4,13 @@ local MSP_OSD_CONFIG = 84
4
4
5
5
local MSP_RADIO_SETUP = 69
6
6
7
- local BUILD_OPTION_VTX = bit32.lshift (1 , 0 )
8
- local BUILD_OPTION_GPS = bit32.lshift (1 , 1 )
9
- local BUILD_OPTION_OSD_SD = bit32.lshift (1 , 2 )
7
+ local BUILD_OPTION_VTX = bit32.lshift (1 , 0 )
8
+ local BUILD_OPTION_GPS = bit32.lshift (1 , 1 )
9
+ local BUILD_OPTION_OSD = bit32.lshift (1 , 2 )
10
10
11
11
local isVtxRead = false
12
12
local isGpsRead = false
13
- local isOsdSDRead = false
13
+ local isOsdRead = false
14
14
15
15
local lastRunTS = 0
16
16
local INTERVAL = 100
@@ -24,11 +24,11 @@ local returnTable = {
24
24
local function processRadioSetupReply (payload )
25
25
isVtxRead = true
26
26
isGpsRead = true
27
- isOsdSDRead = true
27
+ isOsdRead = true
28
28
29
29
features .vtx = bit32.band (payload [1 ], BUILD_OPTION_VTX ) ~= 0
30
30
features .gps = bit32.band (payload [1 ], BUILD_OPTION_GPS ) ~= 0
31
- features .osdSD = bit32.band (payload [1 ], BUILD_OPTION_OSD_SD ) ~= 0
31
+ features .osd = bit32.band (payload [1 ], BUILD_OPTION_OSD ) ~= 0
32
32
end
33
33
34
34
local function processMspReply (cmd , payload , err )
@@ -47,9 +47,9 @@ local function processMspReply(cmd, payload, err)
47
47
local providerSet = payload [1 ] ~= 0
48
48
features .gps = isOkay and providerSet
49
49
elseif cmd == MSP_OSD_CONFIG then
50
- isOsdSDRead = true
51
- local osdSDAvailable = payload [1 ] ~= 0
52
- features .osdSD = isOkay and osdSDAvailable
50
+ isOsdRead = true
51
+ local osdAvailable = payload [1 ] ~= 0
52
+ features .osd = isOkay and osdAvailable
53
53
end
54
54
end
55
55
@@ -66,9 +66,9 @@ local function updateFeatures()
66
66
elseif not isGpsRead then
67
67
cmd = MSP_GPS_CONFIG
68
68
returnTable .t = " Checking GPS..."
69
- elseif not isOsdSDRead then
69
+ elseif not isOsdRead then
70
70
cmd = MSP_OSD_CONFIG
71
- returnTable .t = " Checking OSD (SD) ..."
71
+ returnTable .t = " Checking OSD..."
72
72
end
73
73
if cmd and not isInFlight then
74
74
protocol .mspRead (cmd )
@@ -77,7 +77,7 @@ local function updateFeatures()
77
77
end
78
78
mspProcessTxQ ()
79
79
processMspReply (mspPollReply ())
80
- return isVtxRead and isGpsRead and isOsdSDRead
80
+ return isVtxRead and isGpsRead and isOsdRead
81
81
end
82
82
83
83
returnTable .f = updateFeatures
0 commit comments