From c94ace87f928e7b090c20066eb477658008dd5b3 Mon Sep 17 00:00:00 2001 From: Paul Hollinsky Date: Thu, 3 Jan 2019 17:08:47 -0500 Subject: [PATCH] Timestamp information for CAN frames --- communication/packet/canpacket.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/communication/packet/canpacket.cpp b/communication/packet/canpacket.cpp index 417c50b..8b29b63 100644 --- a/communication/packet/canpacket.cpp +++ b/communication/packet/canpacket.cpp @@ -17,6 +17,10 @@ std::shared_ptr HardwareCANPacket::DecodeToMessage(const std::vector msg->arbid = data->header.SID; } + // This timestamp is raw off the device (in timestampMultiplier increments) + // Decoder will fix as it has information about the timestampMultiplier increments + msg->timestamp = data->timestamp.TS; + // DLC uint8_t length = data->dlc.DLC; msg->dlcOnWire = length; // This will hold the real DLC on wire 0x0 - 0xF