Go to Post Where before there was boredom and lack of understanding, suddenly I saw why competitions would be fun. Not to sound corny or anything, but it brought a side out of me that I used to never show people in public. I danced, cheered, screamed, and had a blast. - DevilChild [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 13-02-2002, 16:30
ttedrow's Avatar
ttedrow ttedrow is offline
Herding electrons
AKA: Tim Tedrow
FRC #0281 (EnTech)
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2000
Location: Greenville, SC
Posts: 165
ttedrow will become famous soon enoughttedrow will become famous soon enough
Question PBasic ?

What are these varibles use for?

c_delta_t CON 0
c_packet_num CON 0
c_res01 CON 0
  #2   Spotlight this post!  
Unread 13-02-2002, 23:32
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,567
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
If you set the constant to any of those variables to 1, it means that you want to read it. You must still add it to the appropriate place in the sering command. Not sure if that is what you want, or actually what those variables measure.

delta_t tells you how many radio packets the robot has missed since the last good packet. If your program is really complex, it may be possible to still be processing and miss a packet.

packet_num gives you the number of the current packet, which is a count since the controller was turned on.

I don't know what res01 does.
  #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.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PBASIC ARCTAN function Greg Ross Programming 14 11-05-2003 12:28
Obscure PBASIC for RoboEmu rbayer Programming 1 28-03-2003 23:57
PBasic 2.5 vs. 2.0 Anthony Kesich Programming 6 09-02-2003 22:06
RoboEmu 1.09 (supports PBASIC 2.5) rbayer Programming 22 21-01-2003 17:22
PBASIC Loop Speed? archiver 2001 3 23-06-2002 23:46


All times are GMT -5. The time now is 01:15.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi