Go to Post During 5th week, EVERYTHING becomes a programming problem... hahah. - Mr. Lim [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
  #2   Spotlight this post!  
Unread 30-11-2007, 21:35
Pat Fairbank's Avatar
Pat Fairbank Pat Fairbank is offline
Circuit Breaker
FRC #0254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2001
Location: San Jose, CA
Posts: 2,132
Pat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond reputePat Fairbank has a reputation beyond repute
Send a message via MSN to Pat Fairbank
Re: help getting servo values from camera

Since the default code just uses PWMs 1 and 2 for the camera servos, you should be able to just read the values in directly from the pwm01 and pwm02 variables at any point in the loop after the Camera_Handler() function is called.

As for knowing if the camera is locked on, you can use the camera confidence value - the higher it is, the more sure the camera is that it is locked on to a target. There's a predefined threshold macro (its default value is 20), so you can just do something like this:
Code:
if (T_Packet_Data.confidence >= CONFIDENCE_THRESHOLD_DEFAULT)
{
  // locked on
}
else
{
  // searching
}
Edit: Alternately, you can call the Get_Tracking_State() function, which will return SEARCHING, TARGET_IN_VIEW, or CAMERA_ON_TARGET.

I've never used the camera menu, so unfortunately I can't help you with the last point.
__________________
Patrick Fairbank
Team 254 | Mentor (2012-)
Team 1503 | Mentor (2007-2011)
Team 296 | Alumnus (2001-2004) | Mentor (2005-2006)

patfairbank.com

Last edited by Pat Fairbank : 30-11-2007 at 21:39.
 


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
Servo Values to Degrees... How? mogunus Programming 16 11-04-2007 02:03
Servo input values bush Motors 5 03-02-2006 18:49
Finding the *final* Servo Center values? Andrew Blair Programming 2 22-01-2006 18:02
Servo Values DanDon Motors 8 14-02-2005 15:49
Dashboard View of Pan and Tilt Servo Values JoeXIII'007 Programming 1 02-02-2005 22:34


All times are GMT -5. The time now is 19:39.

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