mirror of
https://github.com/MoreTore/openpilot.git
synced 2026-08-05 00:05:59 +08:00
@@ -29,17 +29,20 @@ class LogState {
|
||||
};
|
||||
|
||||
LogState::~LogState() {
|
||||
zmq_close(sock);
|
||||
zmq_ctx_destroy(zctx);
|
||||
// zmq_close(sock);
|
||||
//zmq_ctx_destroy(zctx);
|
||||
}
|
||||
|
||||
static LogState s = {};
|
||||
|
||||
/*
|
||||
static void cloudlog_bind_locked(const char* k, const char* v) {
|
||||
s.ctx_j[k] = v;
|
||||
//s.ctx_j[k] = v;
|
||||
}
|
||||
|
||||
|
||||
static void cloudlog_init() {
|
||||
|
||||
if (s.inited) return;
|
||||
s.ctx_j = json11::Json::object {};
|
||||
s.zctx = zmq_ctx_new();
|
||||
@@ -80,9 +83,11 @@ static void cloudlog_init() {
|
||||
}
|
||||
|
||||
s.inited = true;
|
||||
}
|
||||
|
||||
}
|
||||
*/
|
||||
void log(int levelnum, const char* filename, int lineno, const char* func, const char* msg, const std::string& log_s) {
|
||||
/*
|
||||
std::lock_guard lk(s.lock);
|
||||
cloudlog_init();
|
||||
if (levelnum >= s.print_level) {
|
||||
@@ -90,10 +95,12 @@ void log(int levelnum, const char* filename, int lineno, const char* func, const
|
||||
}
|
||||
char levelnum_c = levelnum;
|
||||
zmq_send(s.sock, (levelnum_c + log_s).c_str(), log_s.length() + 1, ZMQ_NOBLOCK);
|
||||
*/
|
||||
}
|
||||
|
||||
void cloudlog_e(int levelnum, const char* filename, int lineno, const char* func,
|
||||
const char* fmt, ...) {
|
||||
/*
|
||||
char* msg_buf = nullptr;
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
@@ -114,10 +121,13 @@ void cloudlog_e(int levelnum, const char* filename, int lineno, const char* func
|
||||
std::string log_s = log_j.dump();
|
||||
log(levelnum, filename, lineno, func, msg_buf, log_s);
|
||||
free(msg_buf);
|
||||
*/
|
||||
}
|
||||
|
||||
void cloudlog_bind(const char* k, const char* v) {
|
||||
/*
|
||||
std::lock_guard lk(s.lock);
|
||||
cloudlog_init();
|
||||
cloudlog_bind_locked(k, v);
|
||||
*/
|
||||
}
|
||||
|
||||
@@ -6,13 +6,13 @@ from selfdrive.hardware import EON, TICI, PC
|
||||
WEBCAM = os.getenv("USE_WEBCAM") is not None
|
||||
|
||||
procs = [
|
||||
DaemonProcess("manage_athenad", "selfdrive.athena.manage_athenad", "AthenadPid"),
|
||||
#DaemonProcess("manage_athenad", "selfdrive.athena.manage_athenad", "AthenadPid"),
|
||||
# due to qualcomm kernel bugs SIGKILLing camerad sometimes causes page table corruption
|
||||
NativeProcess("camerad", "selfdrive/camerad", ["./camerad"], unkillable=True, driverview=True),
|
||||
NativeProcess("clocksd", "selfdrive/clocksd", ["./clocksd"]),
|
||||
NativeProcess("dmonitoringmodeld", "selfdrive/modeld", ["./dmonitoringmodeld"], enabled=(not PC or WEBCAM), driverview=True),
|
||||
NativeProcess("logcatd", "selfdrive/logcatd", ["./logcatd"]),
|
||||
NativeProcess("loggerd", "selfdrive/loggerd", ["./loggerd"]),
|
||||
#NativeProcess("loggerd", "selfdrive/loggerd", ["./loggerd"]),
|
||||
NativeProcess("modeld", "selfdrive/modeld", ["./modeld"]),
|
||||
NativeProcess("navd", "selfdrive/ui/navd", ["./navd"], enabled=(PC or TICI), persistent=True),
|
||||
NativeProcess("proclogd", "selfdrive/proclogd", ["./proclogd"]),
|
||||
@@ -24,18 +24,18 @@ procs = [
|
||||
NativeProcess("boardd", "selfdrive/boardd", ["./boardd"], enabled=False),
|
||||
PythonProcess("calibrationd", "selfdrive.locationd.calibrationd"),
|
||||
PythonProcess("controlsd", "selfdrive.controls.controlsd"),
|
||||
PythonProcess("deleter", "selfdrive.loggerd.deleter", persistent=True),
|
||||
#PythonProcess("deleter", "selfdrive.loggerd.deleter", persistent=True),
|
||||
PythonProcess("dmonitoringd", "selfdrive.monitoring.dmonitoringd", enabled=(not PC or WEBCAM), driverview=True),
|
||||
PythonProcess("logmessaged", "selfdrive.logmessaged", persistent=True),
|
||||
#PythonProcess("logmessaged", "selfdrive.logmessaged", persistent=True),
|
||||
PythonProcess("pandad", "selfdrive.pandad", persistent=True),
|
||||
PythonProcess("paramsd", "selfdrive.locationd.paramsd"),
|
||||
PythonProcess("plannerd", "selfdrive.controls.plannerd"),
|
||||
PythonProcess("radard", "selfdrive.controls.radard"),
|
||||
PythonProcess("thermald", "selfdrive.thermald.thermald", persistent=True),
|
||||
PythonProcess("timezoned", "selfdrive.timezoned", enabled=TICI, persistent=True),
|
||||
PythonProcess("tombstoned", "selfdrive.tombstoned", enabled=not PC, persistent=True),
|
||||
PythonProcess("updated", "selfdrive.updated", enabled=not PC, persistent=True),
|
||||
PythonProcess("uploader", "selfdrive.loggerd.uploader", persistent=True),
|
||||
#PythonProcess("tombstoned", "selfdrive.tombstoned", enabled=not PC, persistent=True),
|
||||
#PythonProcess("updated", "selfdrive.updated", enabled=not PC, persistent=True),
|
||||
#PythonProcess("uploader", "selfdrive.loggerd.uploader", persistent=True),
|
||||
|
||||
# EON only
|
||||
PythonProcess("rtshield", "selfdrive.rtshield", enabled=EON),
|
||||
|
||||
Reference in New Issue
Block a user