Skip to content

Commit

Permalink
Update regovardump.h
Browse files Browse the repository at this point in the history
  • Loading branch information
jagheterfredrik authored Oct 22, 2023
1 parent 1f63f30 commit 69cf709
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions regovardump.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,16 +142,16 @@ class RegoReader : public Component, public CanCallbackInterface {
// 0x09FDBFE0 - More data available
// 0x09FDFFE0 - No more data available

memcpy(buf_ptr, data, data.size());
buf_ptr += message.data_length_code;
memcpy(buf_ptr, data.data(), data.size());
buf_ptr += data.size;

if ((buf_ptr - buf) % 0x500 == 0)
ESP_LOGD(TAG, "read %d", buf_ptr - buf);

if (buf_ptr - buf >= 0x4e20 + leftover) { // Read all data
state = 3;
}
if (message.identifier == 0x09FDFFE0) { //No more data
if (can_id == 0x09FDFFE0) { //No more data
state = 4;
ESP_LOGD(TAG, "Got end of data flag");
}
Expand Down

0 comments on commit 69cf709

Please sign in to comment.