test: fixed video_sender tests

ref: N25B-393
This commit is contained in:
Storm
2026-01-29 12:16:48 +01:00
parent 4a2cace1cf
commit 56becd84ac
2 changed files with 14 additions and 6 deletions

View File

@@ -3,6 +3,7 @@ import threading
import logging
import numpy as np
import struct
from robot_interface.endpoints.socket_base import SocketBase
from robot_interface.state import state
@@ -63,8 +64,8 @@ class VideoSender(SocketBase):
width = img[0]
height = img[1]
width_bytes = width.to_bytes(4, 'little')
height_bytes = height.to_bytes(4, 'little')
width_bytes = struct.pack('<I', width)
height_bytes = struct.pack('<I', height)
self.socket.send_multipart([width_bytes, height_bytes, raw_data])
except: