cabana: fixed the issue of parsing multiplexed signals (#28660)

old-commit-hash: 6cc600e84f
beeps
Dean Lee 2 years ago committed by GitHub
parent b324c42641
commit c7425def28
  1. 3
      tools/cabana/dbc/dbc.cc
  2. 1
      tools/cabana/dbc/dbcfile.cc

@ -111,6 +111,9 @@ void cabana::Msg::update() {
for (auto sig : sigs) {
sig->multiplexor = sig->type == cabana::Signal::Type::Multiplexed ? multiplexor : nullptr;
if (!sig->multiplexor) {
if (sig->type == cabana::Signal::Type::Multiplexed) {
sig->type = cabana::Signal::Type::Normal;
}
sig->multiplex_value = 0;
}
}

@ -136,7 +136,6 @@ void DBCFile::parse(const QString &content) {
dbc_assert(++multiplexor_cnt < 2, "Multiple multiplexor");
s.type = cabana::Signal::Type::Multiplexor;
} else {
dbc_assert(multiplexor_cnt == 1, "No multiplexor");
s.type = cabana::Signal::Type::Multiplexed;
s.multiplex_value = indicator.mid(1).toInt();
}

Loading…
Cancel
Save