auto-detect pigeon or quectel (#25991)

* auto-detect pigeon or quectel

* persistent

* fix sim

* fix process replay

* fix locationd unit tests

* fix that

Co-authored-by: Comma Device <device@comma.ai>
This commit is contained in:
Adeeb Shihadeh
2022-10-06 16:46:15 -07:00
committed by GitHub
parent cf1e978ad1
commit 01d05f66fe
9 changed files with 24 additions and 13 deletions
+1
View File
@@ -166,6 +166,7 @@ std::unordered_map<std::string, uint32_t> keys = {
{"TermsVersion", PERSISTENT},
{"Timezone", PERSISTENT},
{"TrainingVersion", PERSISTENT},
{"UbloxAvailable", PERSISTENT},
{"UpdateAvailable", CLEAR_ON_MANAGER_START},
{"UpdateFailedCount", CLEAR_ON_MANAGER_START},
{"UpdaterState", CLEAR_ON_MANAGER_START},
+2 -2
View File
@@ -29,8 +29,8 @@ public:
// helpers for reading values
std::string get(const std::string &key, bool block = false);
inline bool getBool(const std::string &key) {
return get(key) == "1";
inline bool getBool(const std::string &key, bool block = false) {
return get(key, block) == "1";
}
std::map<std::string, std::string> readAll();
+3 -3
View File
@@ -16,7 +16,7 @@ cdef extern from "common/params.h":
cdef cppclass c_Params "Params":
c_Params(string) nogil
string get(string, bool) nogil
bool getBool(string) nogil
bool getBool(string, bool) nogil
int remove(string) nogil
int put(string, string) nogil
int putBool(string, bool) nogil
@@ -68,11 +68,11 @@ cdef class Params:
return val if encoding is None else val.decode(encoding)
def get_bool(self, key):
def get_bool(self, key, bool block=False):
cdef string k = self.check_key(key)
cdef bool r
with nogil:
r = self.p.getBool(k)
r = self.p.getBool(k, block)
return r
def put(self, key, dat):