Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions src/SCRIPTS/BF/background.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,8 @@ local timeIsSet = false
local getApiVersion, setRtc, rssiTask
local rssiEnabled = true

local function modelActive()
return getValue(protocol.stateSensor) > 0
end

local function run_bg()
if modelActive() then
if getRSSI() > 0 then
-- Send data when the telemetry connection is available
-- assuming when sensor value higher than 0 there is an telemetry connection
if not apiVersionReceived then
Expand Down
4 changes: 0 additions & 4 deletions src/SCRIPTS/BF/protocols.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ local supportedProtocols =
smartPort =
{
mspTransport = "MSP/sp.lua",
rssi = function() return getValue("RSSI") end,
stateSensor = "Tmp1",
push = sportTelemetryPush,
maxTxBufferSize = 6,
maxRxBufferSize = 6,
Expand All @@ -16,8 +14,6 @@ local supportedProtocols =
{
mspTransport = "MSP/crsf.lua",
cmsTransport = "CMS/crsf.lua",
rssi = function() return getValue("TQly") end,
stateSensor = "1RSS",
push = crossfireTelemetryPush,
maxTxBufferSize = 8,
maxRxBufferSize = 58,
Expand Down
2 changes: 1 addition & 1 deletion src/SCRIPTS/BF/ui.lua
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ local function run_ui(event)
prevUiState = nil
end
end
if protocol.rssi() == 0 then
if getRSSI() == 0 then
lcd.drawText(radio.NoTelem[1],radio.NoTelem[2],radio.NoTelem[3],radio.NoTelem[4])
end
mspProcessTxQ()
Expand Down
6 changes: 1 addition & 5 deletions src/SCRIPTS/BF/ui_init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,8 @@ local boardInfoReceived = false
local getApiVersion, getVtxTables, getMCUId, getBoardInfo
local returnTable = { f = nil, t = "" }

local function modelActive()
return getValue(protocol.stateSensor) > 0
end

local function init()
if not modelActive() then
if getRSSI() == 0 then
returnTable.t = "Waiting for connection"
elseif not apiVersionReceived then
getApiVersion = getApiVersion or assert(loadScript("api_version.lua"))()
Expand Down