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

This commit is contained in:
Dean Lee
2023-06-24 04:14:11 +08:00
committed by GitHub
parent d081396102
commit 6cc600e84f
2 changed files with 3 additions and 1 deletions
+3
View File
@@ -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;
}
}
-1
View File
@@ -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();
}