Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 2acf21e

Browse files
Test only USE_OSD
1 parent 9291b0b commit 2acf21e

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

‎src/SCRIPTS/BF/features.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
local features = {
2-
vtx = true,
3-
gps = true,
4-
osdSD = true,
2+
vtx = true,
3+
gps = true,
4+
osd = true,
55
}
66

77
return features

‎src/SCRIPTS/BF/features_info.lua

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ local MSP_OSD_CONFIG = 84
44

55
local MSP_RADIO_SETUP = 69
66

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)
1010

1111
local isVtxRead = false
1212
local isGpsRead = false
13-
local isOsdSDRead = false
13+
local isOsdRead = false
1414

1515
local lastRunTS = 0
1616
local INTERVAL = 100
@@ -24,11 +24,11 @@ local returnTable = {
2424
local function processRadioSetupReply(payload)
2525
isVtxRead = true
2626
isGpsRead = true
27-
isOsdSDRead = true
27+
isOsdRead = true
2828

2929
features.vtx = bit32.band(payload[1], BUILD_OPTION_VTX) ~= 0
3030
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
3232
end
3333

3434
local function processMspReply(cmd, payload, err)
@@ -47,9 +47,9 @@ local function processMspReply(cmd, payload, err)
4747
local providerSet = payload[1] ~= 0
4848
features.gps = isOkay and providerSet
4949
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
5353
end
5454
end
5555

@@ -66,9 +66,9 @@ local function updateFeatures()
6666
elseif not isGpsRead then
6767
cmd = MSP_GPS_CONFIG
6868
returnTable.t = "Checking GPS..."
69-
elseif not isOsdSDRead then
69+
elseif not isOsdRead then
7070
cmd = MSP_OSD_CONFIG
71-
returnTable.t = "Checking OSD (SD)..."
71+
returnTable.t = "Checking OSD..."
7272
end
7373
if cmd and not isInFlight then
7474
protocol.mspRead(cmd)
@@ -77,7 +77,7 @@ local function updateFeatures()
7777
end
7878
mspProcessTxQ()
7979
processMspReply(mspPollReply())
80-
return isVtxRead and isGpsRead and isOsdSDRead
80+
return isVtxRead and isGpsRead and isOsdRead
8181
end
8282

8383
returnTable.f = updateFeatures

‎src/SCRIPTS/BF/pages.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ if apiVersion >= 1.16 then
6060
PageFiles[#PageFiles + 1] = { title = "Trim Accelerometer", script = "acc_trim.lua" }
6161
end
6262

63-
if apiVersion >= 1.45 and features.osdSD then
63+
if apiVersion >= 1.45 and features.osd then
6464
PageFiles[#PageFiles + 1] = { title = "OSD Elements", script = "pos_osd.lua" }
6565
end
6666

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /