mirror of
https://github.com/huggingface/lerobot.git
synced 2026-05-11 14:49:43 +00:00
fix(motors): use decorator to fix precommit (#2951)
This commit is contained in:
@@ -700,14 +700,12 @@ class DamiaoMotorsBus(MotorsBusBase):
|
|||||||
else:
|
else:
|
||||||
logger.warning(f"Packet drop: {motor} (ID: 0x{recv_id:02X}). Using last known state.")
|
logger.warning(f"Packet drop: {motor} (ID: 0x{recv_id:02X}). Using last known state.")
|
||||||
|
|
||||||
|
@check_if_not_connected
|
||||||
def sync_write(self, data_name: str, values: dict[str, Value]) -> None:
|
def sync_write(self, data_name: str, values: dict[str, Value]) -> None:
|
||||||
"""
|
"""
|
||||||
Write values to multiple motors simultaneously. Positions are always in degrees.
|
Write values to multiple motors simultaneously. Positions are always in degrees.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if not self.is_connected:
|
|
||||||
raise DeviceNotConnectedError(f"{self} is not connected.")
|
|
||||||
|
|
||||||
if data_name in ("Kp", "Kd"):
|
if data_name in ("Kp", "Kd"):
|
||||||
key = data_name.lower()
|
key = data_name.lower()
|
||||||
for motor, val in values.items():
|
for motor, val in values.items():
|
||||||
|
|||||||
Reference in New Issue
Block a user