View Single Post
      03-06-2024, 05:10 AM   #87
mrpingu
Captain
Norway
194
Rep
648
Posts

Drives: 2018 F48 X1 xDrive 18D
Join Date: Nov 2022
Location: Norway

iTrader: (0)

Garage List
Quote:
Originally Posted by limsheng View Post
Hi mrpingu, I just searched on my Kombi CC_AKTIEVIERUNG_9 and the default as follows, from my mobile BU.

Wondering if I should just add a custom value and test it out ?

Having to join the club unwillingly and ordered the spring. But it took forever to arrive “sighs”.
You can add a Custom value, I did it for the emergency call one.
It can be calculated which value it needs to be and you can code out every warning. You can always revert safely.





Code:
general idea is that there is 1 bit for each CC-ID and all of them are sequential.



Each group has 8 bytes so 64 (= 8 * 8) bits total.

299 / 64 = 4.xxx so it's 5th group (as groups are counted from 1: 4 + 1 = 5).

299 - 64 * 4 (group)  = 43 so it's 43rd bit in 5th group.

43 / 8 = 5.xxx so it's 5th byte (as bytes are counted from 0: 5 + 0 = 5).

43 - 5 * 8 = 3 so it's 3rd bit (as bits are also counted from 0)

3rd bit has value of 8 (= 2 ^ 3) so FF - 8 = F7. 
Well, to be more precise - works when bit WAS SET ONLY. Normally you would do NOT-AND operation which works always. So initial value FF & (~8). ~8 = F7. FF & F7 = F7.


Assuming cc-id 256, how this math will work?

256 - 64 * 4 = 0
0 / 8 = 0
0 - 0 * 8 = 0

So it will be 0'th bit in byte 0 smile
0'th bit value is 2^0 = 1, so FF & (~1) = FE (assuming initial value was FF)
Appreciate 0