Skip to content

Commit

Permalink
Revert "back to sanity"
Browse files Browse the repository at this point in the history
This reverts commit d490b96.
  • Loading branch information
sshane committed Nov 22, 2023
1 parent d490b96 commit b28d345
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions can/parser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,8 @@ int64_t get_raw_value(const std::vector<uint8_t> &msg, const Signal &sig) {


bool MessageState::parse(uint64_t nanos, const std::vector<uint8_t> &dat) {
std::vector<double> tmp_vals(parse_sigs.size());
bool checksum_failed = false;
bool counter_failed = false;

for (int i = 0; i < parse_sigs.size(); i++) {
const auto &sig = parse_sigs[i];

Expand All @@ -60,7 +58,7 @@ bool MessageState::parse(uint64_t nanos, const std::vector<uint8_t> &dat) {
}
}

tmp_vals[i] = tmp * sig.factor + sig.offset;
vals[i] = tmp * sig.factor + sig.offset;
}

// only update values if both checksum and counter are valid
Expand All @@ -70,7 +68,6 @@ bool MessageState::parse(uint64_t nanos, const std::vector<uint8_t> &dat) {
}

for (int i = 0; i < parse_sigs.size(); i++) {
vals[i] = tmp_vals[i];
all_vals[i].push_back(vals[i]);
}
last_seen_nanos = nanos;
Expand Down

0 comments on commit b28d345

Please sign in to comment.