Go to Post Do you think Pizton's Lard would want to be a FIRST supplier and give every team some lard in the KoP? We could grease our gearboxes with it and every finals match could smell like bacon. - Ty Tremblay [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #7   Spotlight this post!  
Unread 12-02-2007, 23:06
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Camera Code Update

Quote:
Originally Posted by Tyr333 View Post
I've noticed that when the camera is in a search, if the camera is resetting its pan for a new sweep:...and if the camera sees the light during this motion of resetting the pan to its minimum, when it arrives at this new pan position, the camera tilts down. It continues to search at this lower tilt, reaches the maximum pan, tilts back up, sweeps to its minimum pan, sees the light during this trip, and tilts down again. It continues this loop and never tracks the light...What can we do to fix this?
You can change the search pattern code to do a zigzag sweep instead of always going left-to-right. That way it will never be panning too fast to stop when it sees the light, and it won't need to restart the search immediately upon glimpsing and then losing it.

Here's an overview of one way to go about it. Where it tests for the pan value being greater than the maximum limit, set a flag instead of resetting to minimum. Add a similar test for the pan value being less than the minimum and reset the flag if it is. Where the code adds the step size to the current pan value, have it subtract instead if the flag is set.
 


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
Problems Combining Camera Code and Driving Code cmurdoch Programming 20 10-02-2007 16:34
Problems when combine ADC code && camera code nirhaim1942 Programming 1 24-01-2007 06:58
problems using gyro/adc code with camera default code tanstaafl Programming 7 22-01-2006 23:09
Code error on RC after downloading "bells and whistles" version of Kevins camera code DanDon Programming 6 10-01-2006 18:07
Team THRUST - Kevin's Code and Camera Code Combine Chris_Elston Programming 3 31-01-2005 22:28


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

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