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

Method _update_data

dynamixel_client.py:486–491  ·  view source on GitHub ↗

Updates the data index for the given motor ID.

(self, index: int, motor_id: int)

Source from the content-addressed store, hash-verified

484 self._pos_data = np.zeros(len(self.motor_ids), dtype=np.float32)
485
486 def _update_data(self, index: int, motor_id: int):
487 """Updates the data index for the given motor ID."""
488 pos = self.operation.getData(motor_id, ADDR_PRESENT_POSITION,
489 LEN_PRESENT_POSITION)
490 pos = unsigned_to_signed(pos, size=4)
491 self._pos_data[index] = float(pos) * self.pos_scale
492
493 def _get_data(self):
494 """Returns a copy of the data."""

Callers

nothing calls this directly

Calls 1

unsigned_to_signedFunction · 0.85

Tested by

no test coverage detected