Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Servo tracking... pan reverse (http://www.chiefdelphi.com/forums/showthread.php?t=52515)

Terry Yiu 22-01-2007 17:19

Servo tracking... pan reverse
 
Hi, I have a question about the servo tracking for the camera. The tilt tracking works fine... follows the green light. However, the pan servo moves AWAY from the green light. It seems that our pan tracking is reversed and we do not know how to invert it back on EasyC.

Any help would be appreciated. Thanks.

114Klutz 23-01-2007 22:18

Re: Servo tracking... pan reverse
 
Invert it like this (pseudocode)

pan_pwm = 255 - pan_pwm;

Cynix 23-01-2007 22:26

Re: Servo tracking... pan reverse
 
If you're using Kevin Watson's tracking code look in tracking.h and find
Code:

#define PAN_ROTATION_SIGN_DEFAULT
That will be set to either 1 or -1, if your pan is tracking the wrong way try switching the value. I've never used easyc but you can open tracking.h in any plaintext editor like notepad and change the value manually.


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

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