cloudlog support (#608)

* cloudlog support

* cleanup
This commit is contained in:
Adeeb Shihadeh 2022-05-11 15:53:02 -07:00 committed by GitHub
parent 919154efe2
commit 76b7f2e645
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 7 deletions

View File

@ -1,4 +1,4 @@
Import('env', 'envCython', 'cereal')
Import('env', 'envCython', 'cereal', 'common')
import os
from opendbc.can.process_dbc import process
@ -14,7 +14,7 @@ for x in sorted(os.listdir('../')):
env.Depends(dbc, ["dbc.py", "process_dbc.py"])
dbcs.append(dbc)
libdbc = env.SharedLibrary('libdbc', ["dbc.cc", "parser.cc", "packer.cc", "common.cc"]+dbcs, LIBS=["capnp", "kj"])
libdbc = env.SharedLibrary('libdbc', ["dbc.cc", "parser.cc", "packer.cc", "common.cc"]+dbcs, LIBS=[common, "capnp", "kj", "zmq"])
# Build packer and parser
lenv = envCython.Clone()

View File

@ -8,8 +8,8 @@
#include <sys/stat.h>
#include <sys/mman.h>
#include "common.h"
#include "cereal/logger/logger.h"
#include "opendbc/can/common.h"
int64_t get_raw_value(const std::vector<uint8_t> &msg, const Signal &sig) {
int64_t ret = 0;
@ -68,7 +68,7 @@ bool MessageState::parse(uint64_t sec, const std::vector<uint8_t> &dat) {
}
if (checksum_failed || counter_failed) {
WARN("0x%X message checks failed, checksum failed %d, counter failed %d\n", address, checksum_failed, counter_failed);
LOGE("0x%X message checks failed, checksum failed %d, counter failed %d\n", address, checksum_failed, counter_failed);
return false;
}
@ -290,9 +290,9 @@ void CANParser::UpdateValid(uint64_t sec) {
const auto& state = kv.second;
if (state.check_threshold > 0 && (sec - state.seen) > state.check_threshold) {
if (state.seen > 0) {
DEBUG("0x%X TIMEOUT\n", state.address);
LOGE("0x%X TIMEOUT\n", state.address);
} else {
DEBUG("0x%X MISSING\n", state.address);
LOGE("0x%X MISSING\n", state.address);
}
can_valid = false;
}