fix(motors): use decorator to fix precommit (#2951)

This commit is contained in:
Steven Palma
2026-02-10 18:40:50 +01:00
committed by GitHub
parent 1ba3975020
commit 3c84d271d5
+1 -3
View File
@@ -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():