View Single Post
  #8   Spotlight this post!  
Unread 05-02-2007, 06:17
JBotAlan's Avatar
JBotAlan JBotAlan is offline
Forever chasing the 'bot around
AKA: Jacob Rau
FRC #5263
Team Role: Mentor
 
Join Date: Sep 2004
Rookie Year: 2004
Location: Riverview, MI
Posts: 723
JBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond repute
Send a message via AIM to JBotAlan Send a message via Yahoo to JBotAlan
Re: Enabling Multiple Light Tracking Using Kevin's Code

Quote:
Originally Posted by Mitch View Post
Thank you, I'll try this. I thought every command needed to be ended with a carriage return? No?
Nope--Kevin's code by default sets the camera to "Raw mode"--see the command RM in the CMUcam manual. His code sends a "RM 5" command; 5 = 101; that means input and output are in raw bytes instead of the normal "XX 1 2 3\r" style. As you can see, "XX 1 2 3\r" is 9 bytes, "XX3123" is only 6. Raw mode is there to trim the fat out of the communications. Just a quote from the manual:

Quote:
If bit 2 is set, input will be read as raw byte values, too. In this mode, after the two command byte values are sent, send 1 byte telling how many arguments are to follow. (i.e. DF followed by the raw byte value 0 for no arguments) No \r character is required.
It's not explained very well, but basically, you send the two-byte command, a byte with the number of arguments, and each argument after that is sent as a single byte.

Good luck,
JBot

EDIT: John, it has nothing to do with when the camera is in poll mode, rather, if it is in raw mode, it will act as I described above. If it is in poll mode, TC (track color) sends 1 T packet, if not, it sends them repeatedly until interrupted by a \r.
__________________
Aren't signatures a bit outdated?