Skip to content

Commit

Permalink
ignore dbc check
Browse files Browse the repository at this point in the history
  • Loading branch information
rav4kumar committed Feb 18, 2024
1 parent fbbbcdb commit 15bba0d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions can/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import os
envDBC = env.Clone()
dbc_file_path = '-DDBC_FILE_PATH=\'"%s"\'' % (envDBC.Dir("..").abspath)
envDBC['CXXFLAGS'] += [dbc_file_path]
envDBC['CXXFLAGS'] += ['-DIGNORE_DBC_CHECKS']
src = ["dbc.cc", "parser.cc", "packer.cc", "common.cc"]
libs = [common, "capnp", "kj", "zmq"]

Expand Down
4 changes: 4 additions & 0 deletions can/parser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -274,10 +274,13 @@ void CANParser::UpdateCans(uint64_t nanos, const capnp::DynamicStruct::Reader& c
}

void CANParser::UpdateValid(uint64_t nanos) {
#ifndef IGNORE_DBC_CHECKS
const bool show_missing = (last_nanos - first_nanos) > 8e9;
#endif

bool _valid = true;
bool _counters_valid = true;
#ifndef IGNORE_DBC_CHECKS
for (const auto& kv : message_states) {
const auto& state = kv.second;

Expand All @@ -298,6 +301,7 @@ void CANParser::UpdateValid(uint64_t nanos) {
_valid = false;
}
}
#endif
can_invalid_cnt = _valid ? 0 : (can_invalid_cnt + 1);
can_valid = (can_invalid_cnt < CAN_INVALID_CNT) && _counters_valid;
}
Expand Down

0 comments on commit 15bba0d

Please sign in to comment.