From 06b4466388beafc1b043e850d14b341a8e918f5f Mon Sep 17 00:00:00 2001 From: Lukas Petersson Date: Wed, 18 May 2022 01:48:48 +0200 Subject: [PATCH] params: expose getParamPath in python (#24572) * params path * cereal --- common/params_pyx.pyx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/common/params_pyx.pyx b/common/params_pyx.pyx index a8c43c2f2f..a64ab58e97 100755 --- a/common/params_pyx.pyx +++ b/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)