Go to Post Who cares about the score? The score is just numbers on a board, the exciting part is watching the robots interact and seeing robots( and more importantly, people) do the impossible. - Herodotus [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 27-01-2007, 15:40
Andrew Blair's Avatar
Andrew Blair Andrew Blair is offline
SAE Formula is FIRST with Gasoline.
FRC #0306 (CRT)
Team Role: Alumni
 
Join Date: Feb 2005
Rookie Year: 2004
Location: Corry
Posts: 1,193
Andrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond repute
Send a message via AIM to Andrew Blair Send a message via Yahoo to Andrew Blair
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;
Issue #2:

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. */
Both workspaces compile fine on their own, and with the commenting or movement of the problems, the merged workspace compiles as well. I'm sure I'm making a single dumb error. Has anyone seen this before?
__________________
Reading makes a full man, conference a ready man, and writing an exact man.
-Sir Francis Bacon

"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction."
-Albert Einstein
  #2   Spotlight this post!  
Unread 27-01-2007, 16:04
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Caņada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Caņada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: Gyro-Camera Compiling Issue

Quote:
Originally Posted by Andrew Blair View Post
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...
If you want, zip-up your build directory and send it to me. I'll have some time later today to look at it.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #3   Spotlight this post!  
Unread 27-01-2007, 18:28
Andrew Blair's Avatar
Andrew Blair Andrew Blair is offline
SAE Formula is FIRST with Gasoline.
FRC #0306 (CRT)
Team Role: Alumni
 
Join Date: Feb 2005
Rookie Year: 2004
Location: Corry
Posts: 1,193
Andrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond reputeAndrew Blair has a reputation beyond repute
Send a message via AIM to Andrew Blair Send a message via Yahoo to Andrew Blair
Re: Gyro-Camera Compiling Issue

Here it is. Thanks for the help!
__________________
Reading makes a full man, conference a ready man, and writing an exact man.
-Sir Francis Bacon

"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction."
-Albert Einstein

Last edited by Kevin Watson : 27-01-2007 at 18:49.
  #4   Spotlight this post!  
Unread 27-01-2007, 18:50
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Caņada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Caņada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: Gyro-Camera Compiling Issue

Quote:
Originally Posted by Andrew Blair View Post
Here it is. Thanks for the help!
Got it. I'll get back to you.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #5   Spotlight this post!  
Unread 27-01-2007, 19:33
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Caņada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Caņada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: Gyro-Camera Compiling Issue

Quote:
Originally Posted by Andrew Blair View Post
Here it is. Thanks for the help!
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
Attached Files
File Type: zip andrew.zip (1.85 MB, 25 views)
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
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
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


All times are GMT -5. The time now is 10:43.

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