Updates the data index for the given motor ID.
(self, index: int, motor_id: int)
| 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.""" |
nothing calls this directly
no test coverage detected