MCPcopy Create free account
hub / github.com/ExpressLRS/ExpressLRS / _validate_serialrx

Function _validate_serialrx

src/python/BFinitPassthrough.py:24–37  ·  view source on GitHub ↗
(rl, config, expected)

Source from the content-addressed store, hash-verified

22
23
24def _validate_serialrx(rl, config, expected):
25 found = False
26 if type(expected) == str:
27 expected = [expected]
28 rl.set_delimiters(["# "])
29 rl.clear()
30 rl.write_str("get %s" % config)
31 line = rl.read_line(1.).strip()
32 for key in expected:
33 key = " = %s" % key
34 if key in line:
35 found = True
36 break
37 return found
38
39
40def bf_passthrough_init(port, requestedBaudrate):

Callers 1

bf_passthrough_initFunction · 0.85

Calls 4

set_delimitersMethod · 0.80
write_strMethod · 0.80
read_lineMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected