FAQFAQ SearchSearch MemberlistMemberlist UsergroupsUsergroups RegisterRegister
ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in

 
Bitmasks

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    TunerPro User Forum Forum Index -> ScannerPro Beta Discussion
 
Sil



Joined: 13 Feb 2006
Posts: 38

PostPosted: Wed Oct 11, 2006 5:01 pm    Post subject: Bitmasks Reply with quote

cant figure out how to add bitmasks
i dont understand, like in tunerpro rt aldl editor you put in the address
then put in the bit
in scannerpro there is operations?wtf

say i want to add the following, how would i go about doing it....
Code:

 59      FMDBYTE1     BIT STATUS WORD
            0      PARK/NEUTRAL                                1=OFF  0=ON
            1      3RD GEAR                                    1=ON   0=OFF
            2      4TH GEAR                                    1=ON   0=OFF
            3      P/S CRAMP    (0=CRAMP)                      1=OFF  0=ON
            4      READ BUT NOT USED
            5      V5 COOLING FAN DISCRETE (A/C PRESSURE SW)   1=OFF  0=ON       (1 = REQUESTED)
            6      DISCRETE CRUISE CONTROL                     1=OFF  0=ON
            7      AIR CONDITIONER REQUEST                     1=ON   0=OFF
Back to top
View user's profile Send private message
 

 
Mangus
TunerPro Author


Joined: 19 Mar 2003
Posts: 1810

PostPosted: Wed Oct 11, 2006 6:37 pm    Post subject: Reply with quote

Bitwise AND

0x1 = bit 0
0x2 = bit 1
0x4 = bit 2
0x8 = bit 3
0x10 = bit 4
0x20 = bit 5
0x40 = bit 6
0x80 = bit 7

so, for 4th gear flag, set the offset to 58 (0-based), Bitwise AND, operand is 0x04, and result is 0x04. This is the same as saying "if the data at offset 58 is ANDed with 0x04 and the result is 0x04, then the flag is set, otherwise it's cleared".

More information on bitwise operations here:
http://en.wikipedia.org/wiki/Bitwise_operation
_________________
***************************************
TunerPro Author
1989 Trans Am
Back to top
View user's profile Send private message
 

 
Sil



Joined: 13 Feb 2006
Posts: 38

PostPosted: Wed Oct 11, 2006 7:01 pm    Post subject: Reply with quote

alrighty, thanks for clarifing
was confused when i was looking at the 8d adx and seen values like 3c ect..
so when i compared that to the a100 aldl stuff it didnt match the address and i got confused lol
Back to top
View user's profile Send private message
 

Display posts from previous:   
View previous topic :: View next topic  
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    TunerPro User Forum Forum Index -> ScannerPro Beta Discussion All times are GMT - 9 Hours
 
Page 1 of 1
Jump to:  
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
 


Powered by phpBB © 2001, 2002 phpBB Group
RedSquare theme 1.0.3 © DoubleJ(Jan Jaap)