mirror of
https://github.com/MoreTore/openpilot.git
synced 2026-08-06 00:36:32 +08:00
Params: python-like interface (#20506)
* rebase master
* delete outdated test_params.c
* putBool & more robust getBool
* putBool(SshEnabled)
old-commit-hash: 98e55996f6
This commit is contained in:
@@ -12,5 +12,5 @@ cdef extern from "selfdrive/common/params.h":
|
||||
Params(bool)
|
||||
Params(string)
|
||||
string get(string, bool) nogil
|
||||
int delete_db_value(string)
|
||||
int write_db_value(string, string)
|
||||
int remove(string)
|
||||
int put(string, string)
|
||||
|
||||
@@ -157,11 +157,11 @@ cdef class Params:
|
||||
if key not in keys:
|
||||
raise UnknownKeyName(key)
|
||||
|
||||
self.p.write_db_value(key, dat)
|
||||
self.p.put(key, dat)
|
||||
|
||||
def delete(self, key):
|
||||
key = ensure_bytes(key)
|
||||
self.p.delete_db_value(key)
|
||||
self.p.remove(key)
|
||||
|
||||
|
||||
def put_nonblocking(key, val, d=None):
|
||||
|
||||
Reference in New Issue
Block a user