Go to Post step it up, stop trying to validate mediocrity - Aren_Hill [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 21-01-2006, 16:41
Windward's Avatar
Windward Windward is offline
Registered User
FRC #1452
Team Role: Programmer
 
Join Date: Nov 2005
Rookie Year: 2004
Location: So Cal
Posts: 88
Windward is an unknown quantity at this point
default camera code edit

Does the default code for the camera (MPLab) have some sort of setting or special function that prevents programmers from adding their own code? The camera code runs perfectly (as far as we can tell anyway), but our code that we added to the file under Default_Routine (which worked on other default codes) doesn't work now. Is there something we are supposed to change or do?
  #2   Spotlight this post!  
Unread 21-01-2006, 17:02
scitobor 617's Avatar
scitobor 617 scitobor 617 is offline
More nerd than you can handle!
AKA: Alan Meekins
FRC #0617 (HSHS 617 "DUKE")
Team Role: Programmer
 
Join Date: Nov 2003
Rookie Year: 2003
Location: Richmond, VA
Posts: 153
scitobor 617 will become famous soon enoughscitobor 617 will become famous soon enough
Send a message via AIM to scitobor 617
Re: default camera code edit

Make sure that you call the Default_Routine from the Process_Data_From_Master_uP function, it is commented out in the default camera code.
__________________
Beta testers needed!
http://www.nullagent.no-ip.com

Your kidding, there are other operating systems besides Linux?!
  #3   Spotlight this post!  
Unread 21-01-2006, 17:15
Windward's Avatar
Windward Windward is offline
Registered User
FRC #1452
Team Role: Programmer
 
Join Date: Nov 2005
Rookie Year: 2004
Location: So Cal
Posts: 88
Windward is an unknown quantity at this point
Re: default camera code edit

Quote:
Originally Posted by scitobor 617
Make sure that you call the Default_Routine from the Process_Data_From_Master_uP function, it is commented out in the default camera code.
Mine isn't commented out.
  #4   Spotlight this post!  
Unread 21-01-2006, 17:41
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: default camera code edit

Quote:
Originally Posted by Windward
Mine isn't commented out.
As pointed out above, the *call* to default_routine() from Process_Data_From_Master_uP() is probably still commented out. This is done for safety reasons. Also make sure that code in default_routine() doesn't modify the camera's pan and tilt PWM values.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #5   Spotlight this post!  
Unread 21-01-2006, 18:11
Windward's Avatar
Windward Windward is offline
Registered User
FRC #1452
Team Role: Programmer
 
Join Date: Nov 2005
Rookie Year: 2004
Location: So Cal
Posts: 88
Windward is an unknown quantity at this point
Re: default camera code edit

Quote:
Originally Posted by Kevin Watson
As pointed out above, the *call* to default_routine() from Process_Data_From_Master_uP() is probably still commented out. This is done for safety reasons. Also make sure that code in default_routine() doesn't modify the camera's pan and tilt PWM values.

-Kevin
As I said, I checked in main.c and it is not commented out, unless it is called another time which I didn't check.
  #6   Spotlight this post!  
Unread 21-01-2006, 19:17
scitobor 617's Avatar
scitobor 617 scitobor 617 is offline
More nerd than you can handle!
AKA: Alan Meekins
FRC #0617 (HSHS 617 "DUKE")
Team Role: Programmer
 
Join Date: Nov 2003
Rookie Year: 2003
Location: Richmond, VA
Posts: 153
scitobor 617 will become famous soon enoughscitobor 617 will become famous soon enough
Send a message via AIM to scitobor 617
Re: default camera code edit

Quote:
Originally Posted by Windward
As I said, I checked in main.c and it is not commented out, unless it is called another time which I didn't check.
It, default_routine(), should be called from user_routines.c by the function Process_Data_From_Master_uP(). Another way to make modifications is to just edit Process_Data_From_Master_uP().
__________________
Beta testers needed!
http://www.nullagent.no-ip.com

Your kidding, there are other operating systems besides Linux?!
  #7   Spotlight this post!  
Unread 21-01-2006, 20:31
Jared Russell's Avatar
Jared Russell Jared Russell is offline
Taking a year (mostly) off
FRC #0254 (The Cheesy Poofs), FRC #0341 (Miss Daisy)
Team Role: Engineer
 
Join Date: Nov 2002
Rookie Year: 2001
Location: San Francisco, CA
Posts: 3,082
Jared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond repute
Re: default camera code edit

Also make sure you aren't calling any other functions that modify PWM values after Default_Routines().
  #8   Spotlight this post!  
Unread 25-01-2006, 18:11
Windward's Avatar
Windward Windward is offline
Registered User
FRC #1452
Team Role: Programmer
 
Join Date: Nov 2005
Rookie Year: 2004
Location: So Cal
Posts: 88
Windward is an unknown quantity at this point
Re: default camera code edit

My bad. Turns out it was commented out somewhere else (or I went without sleep to long).

When I uncommented Default_Routine(), the camera started acting strange. The pwms would switch numbers back and forth such that the camera was vibrating.

I checked the code to see if it changed the pwms for the camera, and didn't find anything.

Last edited by Windward : 25-01-2006 at 18:24.
  #9   Spotlight this post!  
Unread 25-01-2006, 18:33
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: default camera code edit

Trouble is, in that Default_routine function you uncommented, there are other things that control pwm01 and pwm02. So you, at the top of default_routine, just delete those two lines of code that modify pwm01 and pwm02.
__________________
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
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
Out of the Box Camera Code russell Programming 9 21-10-2009 05:28
problems using gyro/adc code with camera default code tanstaafl Programming 7 22-01-2006 23:09
Getting the Camera and Default Code to Work nukem Programming 5 18-01-2006 11:48
Team THRUST - Kevin's Code and Camera Code Combine Chris_Elston Programming 3 31-01-2005 22:28
heres the code. y this not working omega Programming 16 31-03-2004 15:18


All times are GMT -5. The time now is 13:18.

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