Thread: PBasic ?
View Single Post
  #3   Spotlight this post!  
Unread 13-02-2002, 23:34
Lloyd Burns Lloyd Burns is offline
Registered User
FRC #1246 (Agincourt Robotics)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Toronto
Posts: 292
Lloyd Burns is an unknown quantity at this point
Re: PBasic ?

Quote:
Originally posted by ttedrow
What are these varibles use for?

c_delta_t CON 0
c_packet_num CON 0
c_res01 CON 0

These c_"something" CONstants (not variables) apprear in a section which will tell the input micro which of up to 26 variables you choose to read in, from a list of 32. Looking further down, TempA,B,C, and D are made up of these constants, and on powerup, these 4 bytes are sent to the input micro.

c_delta_t CON 0 disallows, and 1 allows delta_t in via the serin statement in the Mainloop. It has to go to some appropriate sized variable, so you have to take the ' away from the variable declaration ("uncomment it").

Each set of data the OI sends has a serial number, just an up-counter that rolls over to 0, at 255. This is the packet_num. Delta_t is the difference between the current packet_num and what it was on the last successfully received packet.

Haven't used res01, so have no info on it.