Skip to content

Commit 5a91d58

Browse files
authored
Merge pull request #321 from klutvott123/fix-radio-not-supported
Fix "Radio not supported" message
2 parents fbd93ce + 909687c commit 5a91d58

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

src/SCRIPTS/BF/protocols.lua

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@ local function getProtocol()
3232
end
3333
end
3434

35-
local protocol = getProtocol()
36-
37-
if not protocol then
38-
error("Telemetry protocol not supported!")
39-
end
35+
local protocol = assert(getProtocol(), "Telemetry protocol not supported!")
4036

4137
return protocol

src/SCRIPTS/BF/radios.lua

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,7 @@ local supportedRadios =
4444
},
4545
}
4646

47-
local radio = supportedRadios[tostring(LCD_W) .. "x" .. tostring(LCD_H)]
48-
49-
if not radio then
50-
error("Radio not supported: "..rad)
51-
end
47+
local resolution = LCD_W.."x"..LCD_H
48+
local radio = assert(supportedRadios[resolution], resolution.." not supported")
5249

5350
return radio

0 commit comments

Comments
 (0)