Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
esp32_can
==========
**January 2025:<br/>
Updated ESP32CAN::processFrame() to set msg.timestamps to micros()
for accurate CAN timestamps when saving to the SD card for [ESP32_RET_SD](https://github.com/MotorvateDIY/ESP32_RET_SD)**

A new, unified library all inclusive of code needed to make it operate. Implements
a CAN driver for the built-in CAN hardware on an ESP32. Also implements a driver
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=ESP32_CAN
version=0.2.5
version=0.2.6
author=Collin Kidder
maintainer=Collin Kidder <[email protected]>
sentence=Library to facilitate CAN functionality with the on-chip CAN hardware as well as the MCP2517FD
Expand Down
3 changes: 3 additions & 0 deletions src/esp32_can_builtin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,9 @@ bool ESP32CAN::processFrame(twai_message_t &frame)

cyclesSinceTraffic = 0; //reset counter to show that we are receiving traffic

// get timestamp in microseconds asap after CAN frame is received.
msg.timestamp = micros();

msg.id = frame.identifier;
msg.length = frame.data_length_code;
msg.rtr = frame.rtr;
Expand Down