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.

Invert it like this (pseudocode)

pan_pwm = 255 - pan_pwm;

If you’re using Kevin Watson’s tracking code look in tracking.h and find


#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.