MCPcopy Index your code
hub / github.com/RizeCrime/linuxblaster_control / send_recv

Function send_recv

testing/test_usb.py:38–45  ·  view source on GitHub ↗
(data, label="")

Source from the content-addressed store, hash-verified

36 return responses
37
38def send_recv(data, label=""):
39 send(data)
40 r = recv()
41 if r:
42 print(f" {label:25s} -> {r[:12].hex(' ')}")
43 else:
44 print(f" {label:25s} -> TIMEOUT")
45 return r
46
47def f32_val(resp, offset=7):
48 return struct.unpack('<f', resp[offset:offset+4])[0]

Callers 1

test_usb.pyFile · 0.70

Calls 2

sendFunction · 0.70
recvFunction · 0.70

Tested by

no test coverage detected