Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   camera goes to corner when finds light (http://www.chiefdelphi.com/forums/showthread.php?t=54016)

iiiii 12-02-2007 18:40

camera goes to corner when finds light
 
Using easy-c, I have a functioning camera code inside the operator control function. It looks left, right, up and down until it finds the light. When it does find it, the set servo tracking button usually will follow the light succesfully. About 30% of the time, however, once the camera finds the light, it just goes into the upper left corner, and I have no idea why. Does anyone know how to correct this?

kaszeta 12-02-2007 19:14

Re: camera goes to corner when finds light
 
Quote:

Originally Posted by iiiii (Post 576934)
Using easy-c, I have a functioning camera code inside the operator control function. It looks left, right, up and down until it finds the light. When it does find it, the set servo tracking button usually will follow the light succesfully. About 30% of the time, however, once the camera finds the light, it just goes into the upper left corner, and I have no idea why. Does anyone know how to correct this?

If you are using the default tracking code, when it goes to the upper left, that means it has lost lock on the target and has restarted searching.

Are you using a fresh battery?

iiiii 12-02-2007 19:16

Re: camera goes to corner when finds light
 
I am using a fresh battery, and I am not using the default camera code.

kaszeta 12-02-2007 19:37

Re: camera goes to corner when finds light
 
Quote:

Originally Posted by iiiii (Post 576950)
I am using a fresh battery, and I am not using the default camera code.

Does it work with the default camera code, then?

Your code is controlling the servos, so if you aren't using the default code, you'll have to share at least some of your code with us.

jdejoannis 13-02-2007 11:16

Re: camera goes to corner when finds light
 
Is it locked on to the target though? Returning target data? If so, it may be a matter of the settings for the target pixel.

bcieslak 13-02-2007 13:20

Re: camera goes to corner when finds light
 
It sounds like youre camera looks away from the light.
In the tracking.h module there are some bits to change:
Look for:

// If your camera suddenly moves away from the target once
// it finds it, you'll need to change the sign on one or
// both of these values.
#define PAN_ROTATION_SIGN_DEFAULT -1
#define TILT_ROTATION_SIGN_DEFAULT +1

Try experimenting with these.
BC


All times are GMT -5. The time now is 04:46.

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