Go to Post I don't fully buy into the 'we're all winners' concept. That is a broad statement that doesn't really say much. How did we become all winners? What did we do to become winners? Pay an expensive registration fee and participate in a robotic competition? - JaneYoung [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #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
 


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 17: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