View Single Post
  #83   Spotlight this post!  
Unread 14-06-2002, 09:00
Unsung FIRST Hero
Matt Leese Matt Leese is offline
Been-In-FIRST-Too-Long
FRC #1438 (The Aztechs)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1998
Location: Long Beach, CA
Posts: 937
Matt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond repute
Send a message via AIM to Matt Leese
When I wrote my dashboard viewer, I took a bit different take on how to read in the data. I did read in everything one byte at a time. Once I received two 255's, I then started a count. Given the value of the count, I determined what data I was actually reading in. Given that, I processed the data into a structure (ie the structure was updated everytime through the loop which means everytime a byte was read). Then, once the count reached the end of data, I updated the display.

As far as speed issues go, there is no problem reading in a byte at a time. Remember, the data will only be coming at you 20 times per second (20 Hz) which is something a computer can easily process.

Matt