Skip to content

Commit

Permalink
Fix last_sec/first_sec
Browse files Browse the repository at this point in the history
  • Loading branch information
fredyshox committed Aug 25, 2023
1 parent b045c53 commit 32a3a6a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plotjuggler_plugins/DataLoadRlog/rlog_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,15 +180,15 @@ bool RlogMessageParser::parseCanMessage(
uint8_t bus = value.get("src").as<uint8_t>();
if (parsers.find(bus) == parsers.end()) {
parsers[bus] = std::make_shared<CANParser>(bus, dbc_name, true, true);
parsers[bus]->last_sec = 1;
parsers[bus]->first_sec = last_sec;
}

updated_busses.insert(bus);
parsers[bus]->UpdateCans(last_sec, value);
parsers[bus]->last_sec = last_sec;
}
for (uint8_t bus : updated_busses) {
std::vector<SignalValue> signal_values;
parsers[bus]->last_sec = last_sec;
parsers[bus]->query_latest(signal_values, last_sec);
for (auto& sg : signal_values) {
// TODO: plot all updated values
Expand All @@ -205,7 +205,7 @@ bool RlogMessageParser::parseCanMessage(
{(double)p->bus_timeout_threshold, "bus_timeout_threshold"},
{(double)p->first_sec, "first_sec"},
{(double)p->last_sec, "last_sec"},
{(double)p->last_sec, "last_nonempty_sec"},
{(double)p->last_nonempty_sec, "last_nonempty_sec"},
{(double)p->can_invalid_cnt, "can_invalid_cnt"},
};
for (auto k : parser_state) {
Expand Down

0 comments on commit 32a3a6a

Please sign in to comment.