Go to Post If we can figure out how to make a robot in six weeks, a little thing like personality conflict should be easy to overcome. - Al Skierkiewicz [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 18-02-2005, 15:42
cprogrammer's Avatar
cprogrammer cprogrammer is offline
Registered User
FRC #1595 (Gremlins)
Team Role: Programmer
 
Join Date: Feb 2005
Rookie Year: 2005
Location: Washington
Posts: 42
cprogrammer will become famous soon enoughcprogrammer will become famous soon enough
Red face Flags????

I have a quick question. What are flags?? If you know please tell me.

Last edited by Mike Schroeder : 18-02-2005 at 15:45. Reason: Inappropiate language
  #2   Spotlight this post!  
Unread 18-02-2005, 15:52
theDoctor's Avatar
theDoctor theDoctor is offline
Registered User
AKA: Kelly Butcher
#1502 (Technical Difficulties)
Team Role: Programmer
 
Join Date: Jun 2004
Rookie Year: 2005
Location: MI
Posts: 3
theDoctor is an unknown quantity at this point
Re: Flags????

Flags are variables that have two or sometimes more states. They're used to indicate what mode the program is in, for example, whether or not it's tracking a color.
  #3   Spotlight this post!  
Unread 25-07-2005, 19:29
cprogrammer's Avatar
cprogrammer cprogrammer is offline
Registered User
FRC #1595 (Gremlins)
Team Role: Programmer
 
Join Date: Feb 2005
Rookie Year: 2005
Location: Washington
Posts: 42
cprogrammer will become famous soon enoughcprogrammer will become famous soon enough
Re: Flags????

So how would the compiler flag _USE_CMU_CAMERA work?
  #4   Spotlight this post!  
Unread 25-07-2005, 19:34
Ryan M. Ryan M. is offline
Programming User
FRC #1317 (Digital Fusion)
Team Role: Programmer
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Ohio
Posts: 1,508
Ryan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud of
Re: Flags????

Work for what? The flag you mention there just tells the compiler whether or not to compile the default code with the CMU cam code.

If you're looking for someplace to store your own state, then you have to declare your own variables.

P.S. The flag you mentioned isn't really a variable, as a warning. It's actually a preprocessor directive. If you don't know what that is, just ignore my whole PS and know you can't use the "_USE_CMU_CAM" thing.
__________________

  #5   Spotlight this post!  
Unread 25-07-2005, 20:21
sciguy125 sciguy125 is offline
Electrical Engineer
AKA: Phil Baltar
FRC #1351
Team Role: College Student
 
Join Date: Jan 2005
Rookie Year: 2004
Location: Sunnyvale, CA
Posts: 519
sciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond repute
Send a message via AIM to sciguy125 Send a message via MSN to sciguy125 Send a message via Yahoo to sciguy125
Re: Flags????

The way it is implemented in the code, _USE_CMU_CAM is a compiler directive. It tells the compiler to conditionally compile certain sections of code. Specifically, it will compile the code that makes the camera work.

#ifdef _USE_CMU_CAM
...
some code
...
#endif

If _USE_CMU_CAM is defined, the compiler will compile all the code between the #ifdef and #endif. If you're using MPLAB, go to the compiler options and you can define/undefine it. (I don't have MPLAB in front of me, so I'm not sure exactly where it is, but I think it's Project > Settings) If you intend on using the camera, you must have it defined, if you aren't using the camera, you must NOT have it defined. If the code was compiled with the camera code enabled, it will complain about not being able to find the camera when you run it.
__________________

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GE/S/P a-- e y-- r-- s:++ d+ h! X+++
t++ C+ P+ L++ E W++ w M-- V? PS+ PE+
5- R-- tv+ b+ DI+++ D- G
------END GEEK CODE BLOCK------
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
State Flags In Your signature Tytus Gerrish CD Forum Support 15 28-06-2004 09:40
Six Flags? Hermione692 Championship Event 29 29-04-2003 21:12
Will their be Rides on at Six Flags? tonyargote Championship Event 1 31-03-2003 23:17
Six Flags' Coasters Madison Chit-Chat 4 05-12-2002 23:46
Where will/should nationals be? Ricky Q. Championship Event 77 05-12-2002 11:01


All times are GMT -5. The time now is 17:58.

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