Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions examples/common/data_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import threading
import time
from enum import Enum
from typing import Callable
from typing import Any, Callable

import numpy as np

Expand Down Expand Up @@ -117,10 +117,11 @@ def __init__(self) -> None:
self._shutdown_event = threading.Event()

# Callback for state changes (RGB, target joints, current joints)
self._on_change_callback: Callable[[str, float, float], None] | None = None
# the callable takes arguments: (stream_name: str, data: Any, timestamp: float)
self._on_change_callback: Callable[[str, Any, float], None] | None = None

def set_on_change_callback(
self, on_change_callback: Callable[[str, float, float], None]
self, on_change_callback: Callable[[str, Any, float], None]
) -> None:
"""Set on change callback (thread-safe)."""
self._on_change_callback = on_change_callback
Expand Down