Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   default camera code edit (http://www.chiefdelphi.com/forums/showthread.php?t=42373)

Windward 21-01-2006 16:41

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?

scitobor 617 21-01-2006 17:02

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.

Windward 21-01-2006 17:15

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.

Kevin Watson 21-01-2006 17:41

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

Windward 21-01-2006 18:11

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.

scitobor 617 21-01-2006 19:17

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().

Jared Russell 21-01-2006 20:31

Re: default camera code edit
 
Also make sure you aren't calling any other functions that modify PWM values after Default_Routines().

Windward 25-01-2006 18:11

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.

Andrew Blair 25-01-2006 18:33

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.


All times are GMT -5. The time now is 01:03.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi