RegisterSearchFAQMemberlistUsergroupsLog in
Reply to topic Page 1 of 1
Reverse engineering and bitmasking confusion.
Author Message
Reply with quote
Post Reverse engineering and bitmasking confusion. 
I'm trying to get a solid understanding of how to apply a bitmask to read variables within bytes of information on the bus. The platform is a w211 E55 AMG, and there's quite a bit of information offset/requiring a bitmask and odd length in bits.

I figure i'd set up a real example in hopes of assistance.

Can Id= 0x236 (566)
Information is in the first 2 bytes, So:
Length=2 and,
Offset=0
The Variable inside the 2 bytes is xxx##### ######xx, So:
Bitmask= 0x1FFC

Steering Wheel Centerline value =1024,
Locked Left value= 776
Locked Right value = 1272

run the variable through the formula x*1/8+-128,

you get a min/max of -31 and 31

Thanks in advance - Mitch



Last edited by Mitch Detailed on Tue May 09, 2017 3:58 am; edited 1 time in total
View user's profile Send private message Visit poster's website
Reply with quote
Post  
Hi Mitch,

Our next-gen CAN bus support should handle the things you'll need. Demo video here:
https://www.youtube.com/watch?v=zc1Bi__0IDk

These new mapping capabilities should handle nearly all use cases; for things that fall through, you'll still be able to map channels in Lua, where you'll be able to apply arbitrary logic, bitmasks using Lua's bitop libraries, complex formulas and algorithms and so on.

Hope this helps!


_________________
Brent Picasso
Founder, Autosport Labs
Facebook | Twitter
View user's profile Send private message Send e-mail
Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum