feat: communicate face to CB

Had to do some weird socket stuff

ref: N25B-397
This commit is contained in:
JobvAlewijk
2026-01-12 14:25:10 +01:00
parent 3b470c8f29
commit 49386ef8cd
2 changed files with 9 additions and 1 deletions

View File

@@ -28,6 +28,9 @@ class FaceDetectionSender(SocketBase):
self.face_detected = False self.face_detected = False
self._last_seen_face_time = 0 self._last_seen_face_time = 0
def endpoint_description(self):
return None
def start_face_detection(self): def start_face_detection(self):
if not state.qi_session: if not state.qi_session:
logging.info("No Qi session available. Not starting face detection.") logging.info("No Qi session available. Not starting face detection.")

View File

@@ -74,7 +74,12 @@ class MainReceiver(ReceiverBase):
:return: A response dictionary with endpoint descriptions as data. :return: A response dictionary with endpoint descriptions as data.
:rtype: dict[str, list[dict]] :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} return {"endpoint": "negotiate/ports", "data": endpoints}