Fix UI Respring

This commit is contained in:
firestarsdog
2026-03-15 03:05:51 -04:00
parent d451243252
commit 4e6659c028
2 changed files with 8 additions and 3 deletions
+2 -1
View File
@@ -10,6 +10,7 @@ cdef class CLContext:
cdef class VisionBuf:
cdef cppVisionBuf * buf
cdef object _owner
@staticmethod
cdef create(cppVisionBuf*)
cdef create(cppVisionBuf*, object)
+6 -2
View File
@@ -30,11 +30,15 @@ cpdef enum VisionStreamType:
cdef class VisionBuf:
@staticmethod
cdef create(cppVisionBuf * cbuf):
cdef create(cppVisionBuf * cbuf, object owner):
buf = VisionBuf()
buf.buf = cbuf
buf._owner = owner
return buf
def __dealloc__(self):
self._owner = None
@property
def data(self):
return np.asarray(<cnp.uint8_t[:self.buf.len]> self.buf.addr)
@@ -155,7 +159,7 @@ cdef class VisionIpcClient:
buf = self.client.recv(&self.extra, timeout_ms)
if not buf:
return None
return VisionBuf.create(buf)
return VisionBuf.create(buf, self)
def connect(self, bool blocking):
return self.client.connect(blocking)