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

Function send

src/python/crsf.py:129–132  ·  view source on GitHub ↗
(s: serial.Serial, sync: int, line: bytes)

Source from the content-addressed store, hash-verified

127
128
129def send(s: serial.Serial, sync: int, line: bytes):
130 b = bytes([sync, 1 + len(line)]) + line + bytes([calc_crc8(line)])
131 s.write(b)
132 print("req: " + "".join("%02x " % x for x in b))
133
134
135def read_param(s: serial.Serial, param: int, chunk: int):

Callers 3

read_paramFunction · 0.85
crsf.pyFile · 0.85
sendRCFrameMethod · 0.85

Calls 2

calc_crc8Function · 0.70
writeMethod · 0.45

Tested by

no test coverage detected