We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents fbd93ce + 909687c commit 5a91d58Copy full SHA for 5a91d58
src/SCRIPTS/BF/protocols.lua
@@ -32,10 +32,6 @@ local function getProtocol()
32
end
33
34
35
-local protocol = getProtocol()
36
-
37
-if not protocol then
38
- error("Telemetry protocol not supported!")
39
-end
+local protocol = assert(getProtocol(), "Telemetry protocol not supported!")
40
41
return protocol
src/SCRIPTS/BF/radios.lua
@@ -44,10 +44,7 @@ local supportedRadios =
44
},
45
}
46
47
-local radio = supportedRadios[tostring(LCD_W) .. "x" .. tostring(LCD_H)]
48
49
-if not radio then
50
- error("Radio not supported: "..rad)
51
+local resolution = LCD_W.."x"..LCD_H
+local radio = assert(supportedRadios[resolution], resolution.." not supported")
52
53
return radio
0 commit comments