From 49386ef8cd7394505be3cfcec34430793ee1cf4f Mon Sep 17 00:00:00 2001 From: JobvAlewijk Date: Mon, 12 Jan 2026 14:25:10 +0100 Subject: [PATCH] feat: communicate face to CB Had to do some weird socket stuff ref: N25B-397 --- src/robot_interface/endpoints/face_detector.py | 3 +++ src/robot_interface/endpoints/main_receiver.py | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/robot_interface/endpoints/face_detector.py b/src/robot_interface/endpoints/face_detector.py index 75e0930..ca53798 100644 --- a/src/robot_interface/endpoints/face_detector.py +++ b/src/robot_interface/endpoints/face_detector.py @@ -28,6 +28,9 @@ class FaceDetectionSender(SocketBase): self.face_detected = False self._last_seen_face_time = 0 + def endpoint_description(self): + return None + def start_face_detection(self): if not state.qi_session: logging.info("No Qi session available. Not starting face detection.") diff --git a/src/robot_interface/endpoints/main_receiver.py b/src/robot_interface/endpoints/main_receiver.py index 0a479d9..c5341fd 100644 --- a/src/robot_interface/endpoints/main_receiver.py +++ b/src/robot_interface/endpoints/main_receiver.py @@ -74,7 +74,12 @@ class MainReceiver(ReceiverBase): :return: A response dictionary with endpoint descriptions as data. :rtype: dict[str, list[dict]] """ - endpoints = [socket.endpoint_description() for socket in state.sockets] + endpoints = [ + socket.endpoint_description() + for socket in state.sockets + if socket.endpoint_description() is not None + ] + return {"endpoint": "negotiate/ports", "data": endpoints}