mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-18 21:14:01 +08:00
@@ -20,6 +20,7 @@ cdef extern from "selfdrive/common/params.h":
|
||||
int put(string, string) nogil
|
||||
int putBool(string, bool) nogil
|
||||
bool checkKey(string) nogil
|
||||
string getParamPath(string) nogil
|
||||
void clearAll(ParamKeyType)
|
||||
|
||||
|
||||
@@ -94,6 +95,10 @@ cdef class Params:
|
||||
with nogil:
|
||||
self.p.remove(k)
|
||||
|
||||
def get_param_path(self, key=""):
|
||||
cdef string key_bytes = ensure_bytes(key)
|
||||
return self.p.getParamPath(key_bytes).decode("utf-8")
|
||||
|
||||
def put_nonblocking(key, val, d=""):
|
||||
def f(key, val):
|
||||
params = Params(d)
|
||||
|
||||
Reference in New Issue
Block a user