MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / _pack_float

Method _pack_float

tests/scripts/test_frame_parsers.py:409–410  ·  view source on GitHub ↗
(self, value: float)

Source from the content-addressed store, hash-verified

407 return list(header + payload + bytes([0x00, 0x00]))
408
409 def _pack_float(self, value: float) -> bytes:
410 return struct.pack("<f", value)
411
412 def test_attitude_message(self):
413 # Message ID 30: time_boot_ms(4) + roll(4) + pitch(4) + yaw(4) + ...

Callers 1

test_attitude_messageMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected