CAN mapping improvements

Post Reply
User avatar
johu
Site Admin
Posts: 5786
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1021 times
Contact:

CAN mapping improvements

Post by johu »

I have worked on the CAN mapping module a bit more to overcome two limitations
- Mapping across the 32-bit boundary was not possible
- Big endian was not supported

I have added these abilities now and it will slowly trickle into the firmwares on upcoming releases. For now it is only supported for receiving messages, will add it to send messages later.

https://github.com/jsphuebner/libopenin ... 5be425195c

The semantics
As a reminder

Code: Select all

can rx myval 1 8 16 1 0
Maps bits 8-23 . So we start at bit 8 and finish at 23

Contrary with big endian we start at the higher bit and end at the lower bit. The bit order is the same, just the byte order becomes reversed. Consequently we write

Code: Select all

can rx myval 1 23 -16 1 0
So start at bit 23 and finish at bit 8. The - sign in front of length indicates the big endian encoding.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Post Reply