View Single Post
  #3   Spotlight this post!  
Unread 19-07-2004, 08:21
cbolin's Avatar
cbolin cbolin is offline
Programming & Electrical
FRC #0342 (Burning Magnetos)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Charleston, SC
Posts: 72
cbolin is a splendid one to beholdcbolin is a splendid one to beholdcbolin is a splendid one to beholdcbolin is a splendid one to beholdcbolin is a splendid one to beholdcbolin is a splendid one to beholdcbolin is a splendid one to behold
RESOLVED! Dashboard Robot Controller Packet Info??

Hi,
I read the spec last Friday however the means to differentiate between the frames was not explicit. However, after posting this message last Friday, I reread it a few times and finally understood the stuff that read [CTRL_C Bit 7=0, ...]. Did some bit operations first thing this morning and everything is working fine now. :-)

So, it is necessary to read two specific bits in order to figure out which of the 3 frames are being viewed.

Byte 8, bit 4 and Byte 12, bit 7. The frames are then recognized by the following pattern respectively.
Frame 1 = 0,0
Frame 2 = 1,0
Frame 3 = 1,1

The code to read the values went like this. sRec stores the string of 26 characters.

nA4 = Asc(Mid(sRec, 8, 1)) And &H10 'byte 8, bit 4
nC7 = Asc(Mid(sRec, 12, 1)) And &H80 'byte 12, bit 7

Astronouth...I appreciate the offer for the 'control' to do this for me, but the fun in all of this programming is to write the code myself.

Thanks,
Chuck