|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
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.
|
|
#2
|
||||
|
||||
|
Re: Flags????
So how would the compiler flag _USE_CMU_CAMERA work?
![]() |
|
#3
|
||||
|
||||
|
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. |
|
#4
|
|||
|
|||
|
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. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
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 |