Page 1 of 1

CAN mapping improvements

Posted: Fri Dec 29, 2023 8:10 pm
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. ... 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.