MCPcopy Create free account
hub / github.com/MarkFzp/act-plus-plus / convert_to_unsigned

Method convert_to_unsigned

dynamixel_client.py:327–332  ·  view source on GitHub ↗

Converts the given value to its unsigned representation.

(self, value: int, size: int)

Source from the content-addressed store, hash-verified

325 return True
326
327 def convert_to_unsigned(self, value: int, size: int) -> int:
328 """Converts the given value to its unsigned representation."""
329 if value < 0:
330 max_value = (1 << (8 * size)) - 1
331 value = max_value + value
332 return value
333
334 def __enter__(self):
335 """Enables use as a context manager."""

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected