params: expose getParamPath in python (#24572)

* params path

* cereal
old-commit-hash: 06b4466388
taco
Lukas Petersson 3 years ago committed by GitHub
parent 8d6cda4d53
commit 6034c5414a
  1. 5
      common/params_pyx.pyx

@ -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)

Loading…
Cancel
Save