Disk: Update VSA Example and Fix VSA CAN-FD Decode

- Send and validate CAN/CAN-FD/Eth frames in VSA example (two devices)
- Fix failure to decode CAN-FD frames from VSA records
This commit is contained in:
Max Brombach
2024-01-16 18:01:10 +00:00
parent 75e9319c32
commit a44952be13
7 changed files with 196 additions and 27 deletions
+3
View File
@@ -62,6 +62,9 @@ void VSA0DFirst::reorderPayload(std::vector<uint8_t>& secondPayload)
std::vector<uint8_t> tempPayload;
tempPayload.insert(tempPayload.end(), secondPayload.begin(), secondPayload.begin() + 4);
uint8_t* timestampBytes = reinterpret_cast<uint8_t*>(&timestamp);
if(timestampIsExtended) {
timestampBytes[7] += 0x80;
}
tempPayload.insert(tempPayload.end(), timestampBytes, timestampBytes + 8);
tempPayload.insert(tempPayload.end(), secondPayload.begin() + 4, secondPayload.end());
payload.clear();