|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||||
|
|||||
|
Gyro-Camera Compiling Issue
I've been attempting to get all the important bits and pieces of Kevin's gyro code into his camera workspace, and seem to have succeeded except for a couple annoying compiler errors. Before anything, these may all be caused because I'm using MPLab 6.62.
Issue one: During the compile, error #1027 comes up, stating that it cannot find the gyro.h file included in user_routines.c or user_routines_fast.c . I have properly merged it into the workspace. The adc.h file shows no problems, and is found properly. Code:
//User_routines.c or user_routines_fast.h #include <stdio.h> #include "ifi_aliases.h" #include "ifi_default.h" #include "ifi_utilities.h" #include "user_routines.h" #include "serial_ports.h" #include "camera.h" #include "tracking.h" #include "terminal.h" #include "adc.h" #include "gyro.h" //(This line is the problem) extern unsigned char aBreakerWasTripped; In the gyro code, there are several ints variables called in Process_Data_From_Master_uP(). They are flagged during the compile, with an "out of scope" label, but in many other functions, similar variable are defined, without issue. Moving the offending variable out of the function's brackets seems to fix the problem. Code:
void Process_Data_From_Master_uP(void)
{
static unsigned int i = 0; //These variable throw the flag. All of
static unsigned int j = 0; //them.
int temp_gyro_rate;
long temp_gyro_angle;
int temp_gyro_bias;
Getdata(&rxdata); /* Get fresh data from the master microprocessor. */
|
|
#2
|
||||
|
||||
|
Re: Gyro-Camera Compiling Issue
Quote:
-Kevin |
|
#3
|
|||||
|
|||||
|
Re: Gyro-Camera Compiling Issue
Here it is. Thanks for the help!
Last edited by Kevin Watson : 27-01-2007 at 18:49. |
|
#4
|
||||
|
||||
|
Re: Gyro-Camera Compiling Issue
Got it. I'll get back to you.
-Kevin |
|
#5
|
||||
|
||||
|
Re: Gyro-Camera Compiling Issue
I fixed a few things:
1) I copied adc.c/.h & gyro.c/.h into the main build directory. When you include a header file, the compiler assumes it's in the build directory unless a path is provided. 2) I added the ADC and timer 2 interrupt handler routines to interruptlow(). The gyro code needs these. I tested the code and it works with my camera and ADXRS150 gyro. -Kevin |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Compiling problem | Anime-niac_2.9 | VEX | 4 | 19-10-2006 16:13 |
| Gyro/Camera Combination Code Problems | cprogrammer | Programming | 4 | 21-06-2006 21:45 |
| gyro/camera question | Project X | Programming | 2 | 17-05-2006 18:37 |
| problems using gyro/adc code with camera default code | tanstaafl | Programming | 7 | 22-01-2006 23:09 |
| Error in Compiling the Camera Code (B&W Version) | VetteSlick | Programming | 7 | 20-01-2006 20:50 |