Go to Post Where's my hammer? I need a bigger hammer. - 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

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 19-01-2006, 17:40
tanstaafl tanstaafl is offline
Registered User
AKA: Matt Kovacs
FRC #0931 (Perpetual Chaos)
Team Role: Alumni
 
Join Date: Jan 2006
Rookie Year: 2003
Location: St. Louis MO
Posts: 6
tanstaafl is an unknown quantity at this point
Send a message via MSN to tanstaafl
problems using gyro/adc code with camera default code

hi everyone. I've been working on integrating code for the gyro/adc into the default camera stuff, but after I've made sure I've done everything the two readmes (from kevins' frc_gyro and frc_adc) tell me to do, mplab tells me that in user_routines_fast.c there are several unknown members. here's the error list below

frc_camera_gyro\user_routines_fast.c:91:Error [1205] unknown member 'TMR2IF' in '__tag_126'
C:\frc_camera_gyro\user_routines_fast.c:91:Error [1205] unknown member 'TMR2IE' in '__tag_125'
C:\frc_camera_gyro\user_routines_fast.c:91:Error [1124] scalar operands expected for '&&' operator
C:\frc_camera_gyro\user_routines_fast.c:96:Error [1205] unknown member 'ADIF' in '__tag_126'
C:\frc_camera_gyro\user_routines_fast.c:96:Error [1205] unknown member 'ADIE' in '__tag_125'
C:\frc_camera_gyro\user_routines_fast.c:96:Error [1124] scalar operands expected for '&&' operator
C:\frc_camera_gyro\user_routines_fast.c:98:Error [1205] unknown member 'ADIF' in '__tag_126'
C:\frc_camera_gyro\user_routines_fast.c:98:Error [1131] type mismatch in assignment
C:\frc_camera_gyro\user_routines_fast.c:116:Warnin g [2058] call of function without prototype
C:\frc_camera_gyro\user_routines_fast.c:116:Error [1117] scalar type expected in 'if' statement
C:\frc_camera_gyro\user_routines_fast.c:116:Error [1117] scalar type expected in 'if' statement
C:\frc_camera_gyro\user_routines_fast.c:176:Warnin g [2058] call of function without prototype


anyone have any ideas? I know java, but I'm kind of in the dark with c, so any help is greatly appreciated.
__________________
A competent and self-confident person is incapable of jealousy in anything. Jealousy is invariably a symptom of neurotic insecurity
  #2   Spotlight this post!  
Unread 20-01-2006, 16:16
prograid's Avatar
prograid prograid is offline
Registered User
AKA: Ben Cherian
FRC #0254 (The Cheesy Poofs)
Team Role: Alumni
 
Join Date: Oct 2004
Rookie Year: 2004
Location: San Jose
Posts: 80
prograid will become famous soon enough
Re: problems using gyro/adc code with camera default code

Quote:
Originally Posted by tanstaafl
hi everyone. I've been working on integrating code for the gyro/adc into the default camera stuff, but after I've made sure I've done everything the two readmes (from kevins' frc_gyro and frc_adc) tell me to do, mplab tells me that in user_routines_fast.c there are several unknown members. here's the error list below

frc_camera_gyro\user_routines_fast.c:91:Error [1205] unknown member 'TMR2IF' in '__tag_126'
C:\frc_camera_gyro\user_routines_fast.c:91:Error [1205] unknown member 'TMR2IE' in '__tag_125'
C:\frc_camera_gyro\user_routines_fast.c:91:Error [1124] scalar operands expected for '&&' operator
C:\frc_camera_gyro\user_routines_fast.c:96:Error [1205] unknown member 'ADIF' in '__tag_126'
C:\frc_camera_gyro\user_routines_fast.c:96:Error [1205] unknown member 'ADIE' in '__tag_125'
C:\frc_camera_gyro\user_routines_fast.c:96:Error [1124] scalar operands expected for '&&' operator
C:\frc_camera_gyro\user_routines_fast.c:98:Error [1205] unknown member 'ADIF' in '__tag_126'
C:\frc_camera_gyro\user_routines_fast.c:98:Error [1131] type mismatch in assignment
C:\frc_camera_gyro\user_routines_fast.c:116:Warnin g [2058] call of function without prototype
C:\frc_camera_gyro\user_routines_fast.c:116:Error [1117] scalar type expected in 'if' statement
C:\frc_camera_gyro\user_routines_fast.c:116:Error [1117] scalar type expected in 'if' statement
C:\frc_camera_gyro\user_routines_fast.c:176:Warnin g [2058] call of function without prototype


anyone have any ideas? I know java, but I'm kind of in the dark with c, so any help is greatly appreciated.
The Gyro/Adc Code from 2006 already has the camera code for this year. Are you trying to do something else?
  #3   Spotlight this post!  
Unread 20-01-2006, 16:26
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: problems using gyro/adc code with camera default code

Quote:
Originally Posted by tanstaafl
hi everyone. I've been working on integrating code for the gyro/adc into the default camera stuff, but after I've made sure I've done everything the two readmes (from kevins' frc_gyro and frc_adc) tell me to do, mplab tells me that in user_routines_fast.c there are several unknown members. here's the error list below

frc_camera_gyro\user_routines_fast.c:91:Error [1205] unknown member 'TMR2IF' in '__tag_126'
C:\frc_camera_gyro\user_routines_fast.c:91:Error [1205] unknown member 'TMR2IE' in '__tag_125'
C:\frc_camera_gyro\user_routines_fast.c:91:Error [1124] scalar operands expected for '&&' operator
C:\frc_camera_gyro\user_routines_fast.c:96:Error [1205] unknown member 'ADIF' in '__tag_126'
C:\frc_camera_gyro\user_routines_fast.c:96:Error [1205] unknown member 'ADIE' in '__tag_125'
C:\frc_camera_gyro\user_routines_fast.c:96:Error [1124] scalar operands expected for '&&' operator
C:\frc_camera_gyro\user_routines_fast.c:98:Error [1205] unknown member 'ADIF' in '__tag_126'
C:\frc_camera_gyro\user_routines_fast.c:98:Error [1131] type mismatch in assignment
C:\frc_camera_gyro\user_routines_fast.c:116:Warnin g [2058] call of function without prototype
C:\frc_camera_gyro\user_routines_fast.c:116:Error [1117] scalar type expected in 'if' statement
C:\frc_camera_gyro\user_routines_fast.c:116:Error [1117] scalar type expected in 'if' statement
C:\frc_camera_gyro\user_routines_fast.c:176:Warnin g [2058] call of function without prototype


anyone have any ideas? I know java, but I'm kind of in the dark with c, so any help is greatly appreciated.
Depending on which project you started with, you may need to #include <p18f8722.h> at the top of the source file.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #4   Spotlight this post!  
Unread 20-01-2006, 18:08
tanstaafl tanstaafl is offline
Registered User
AKA: Matt Kovacs
FRC #0931 (Perpetual Chaos)
Team Role: Alumni
 
Join Date: Jan 2006
Rookie Year: 2003
Location: St. Louis MO
Posts: 6
tanstaafl is an unknown quantity at this point
Send a message via MSN to tanstaafl
Re: problems using gyro/adc code with camera default code

I started with the camera "bells and whistles" version.

now, because this header file is enclosed between < >, that means it's the compiler's problem to include it, right? or do I have to actually add it to the project file list? I've tried both, just adding the #include part to user_routines_fast.c, trying with both the < > and " " signs, and I also tried actually adding the p18f8722.h while using < > and " ". none of it worked. are there other source files I need to add the #include <p18f8722.h> line to besides user_routines_fast.c? or is that even the source file you were talking about in the first place?
__________________
A competent and self-confident person is incapable of jealousy in anything. Jealousy is invariably a symptom of neurotic insecurity
  #5   Spotlight this post!  
Unread 20-01-2006, 18:24
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: problems using gyro/adc code with camera default code

Quote:
Originally Posted by tanstaafl
I started with the camera "bells and whistles" version.

now, because this header file is enclosed between < >, that means it's the compiler's problem to include it, right? or do I have to actually add it to the project file list? I've tried both, just adding the #include part to user_routines_fast.c, trying with both the < > and " " signs, and I also tried actually adding the p18f8722.h while using < > and " ". none of it worked. are there other source files I need to add the #include <p18f8722.h> line to besides user_routines_fast.c? or is that even the source file you were talking about in the first place?
Okay, it sounds like MPLAB doesn't know where the header files are. Mark McLeod, one of the resident experts on compiler weirdness, posted this: http://www.chiefdelphi.com/forums/sh...53&postcount=6. Hopefully that'll fix your problem.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #6   Spotlight this post!  
Unread 20-01-2006, 22:50
tanstaafl tanstaafl is offline
Registered User
AKA: Matt Kovacs
FRC #0931 (Perpetual Chaos)
Team Role: Alumni
 
Join Date: Jan 2006
Rookie Year: 2003
Location: St. Louis MO
Posts: 6
tanstaafl is an unknown quantity at this point
Send a message via MSN to tanstaafl
Re: problems using gyro/adc code with camera default code

well, I already had that, and I know it was working because when I deleted it in order to test that it actually was working the compiler stopped almost immediately and said it couldn't find stdio.h. my compiler is set up to halt on the first failure, if that makes any difference.
__________________
A competent and self-confident person is incapable of jealousy in anything. Jealousy is invariably a symptom of neurotic insecurity
  #7   Spotlight this post!  
Unread 22-01-2006, 22:00
Mike's Avatar
Mike Mike is offline
has common ground with Matt Krass
AKA: Mike Sorrenti
FRC #0237 (Sie-H2O-Bots (See-Hoe-Bots) [T.R.I.B.E.])
Team Role: Programmer
 
Join Date: Dec 2004
Rookie Year: 2004
Location: Watertown, CT
Posts: 1,003
Mike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond repute
Re: problems using gyro/adc code with camera default code

Try going to Project > Set Language Tool Locations > Microchip C18 Toolsuite > Default Search Paths & Directories > Include Search Path What this is providing is the location for it to search for all the compiler includes (the ones in between <>)

Mine is by default nothing, but your system may be set up differently. I'm guessing here, but I would try setting C:\mcc18\h as the location.

Good luck,
Mike
__________________
http://www.mikesorrenti.com/
  #8   Spotlight this post!  
Unread 22-01-2006, 23:09
tanstaafl tanstaafl is offline
Registered User
AKA: Matt Kovacs
FRC #0931 (Perpetual Chaos)
Team Role: Alumni
 
Join Date: Jan 2006
Rookie Year: 2003
Location: St. Louis MO
Posts: 6
tanstaafl is an unknown quantity at this point
Send a message via MSN to tanstaafl
Re: problems using gyro/adc code with camera default code

sorry, but I haven't been able to post for a bit. it turns out that my prob was that I had a typo. the mentor that's helping me out noticed that after we were going over the code. it wasn't a mispelled word, I just had a 3 in a variable name when there was supposed to be a 1. however, I did still need that p18f8722.h file, so thanks for that, kevin. next time I have a prob, I'll make sure I don't have any typos before I post.
__________________
A competent and self-confident person is incapable of jealousy in anything. Jealousy is invariably a symptom of neurotic insecurity
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
interrupt in default code Gal Longin Programming 5 04-02-2006 20:10
If you could write the default code... Kevin Watson Programming 18 04-08-2005 10:41
Combined Camera and PID/Encoder Code Terry Sherman Programming 1 14-03-2005 17:59
Best Way To Insert Autonomous Code Into Default then load help.? :-)? gemccnp Programming 2 05-02-2005 18:58
CMUCam2 Camera Code - Are important parts commented out? Mr. Lim Programming 4 14-01-2005 12:11


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

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