[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot] 2025-04-08 09:39:48 +00:00
parent 27feea019a
commit 7c5813778b
2 changed files with 3 additions and 3 deletions

View File

@ -64,10 +64,10 @@ class HomonculusArm(Teleoperator):
self.joints_buffer = {joint: deque(maxlen=self.buffer_size) for joint in self.joints}
# Last read dictionary
self.last_d = {joint: 100 for joint in self.joints}
self.last_d = dict.fromkeys(self.joints, 100)
# For adaptive EMA, we store a "previous smoothed" state per joint
self.adaptive_ema_state = {joint: None for joint in self.joints}
self.adaptive_ema_state = dict.fromkeys(self.joints)
self.kalman_state = {joint: {"x": None, "P": None} for joint in self.joints}
self.calibration = None

View File

@ -73,7 +73,7 @@ class HomonculusGlove(Teleoperator):
# Initialize a buffer (deque) for each joint
self.joints_buffer = {joint: deque(maxlen=self.buffer_size) for joint in self.joints}
# Last read dictionary
self.last_d = {joint: 100 for joint in self.joints}
self.last_d = dict.fromkeys(self.joints, 100)
self.calibration = None
self.thread = threading.Thread(target=self.async_read, daemon=True)