Skip to content

Commit 33d0dba

Browse files
committed
Improve protocol detection
From OpenTX 2.3.4 sport/crossfireTelemetryPush behaviour is changed. These functions will now return nil if incorrect telemetry protocol is detected.
1 parent 4592923 commit 33d0dba

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/SCRIPTS/BF/protocols.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ local supportedProtocols =
2727
}
2828

2929
local function getProtocol()
30-
if supportedProtocols.smartPort.push() then
30+
if supportedProtocols.smartPort.push() ~= nil then
3131
return supportedProtocols.smartPort
32-
elseif supportedProtocols.crsf.push() then
32+
elseif supportedProtocols.crsf.push() ~= nil then
3333
return supportedProtocols.crsf
3434
end
3535
end

0 commit comments

Comments
 (0)