|
Re: How to test if the camera is locked on?
on my robot i have the user display show the camera confidence. i found it hovers between 175 and 225 when it has a good lock and drops below 10 when it has lost the light.
code to show confidence on the user display:
User_Mode_byte = T_packet_Data.confidence;
once you know what your camera is returning you could add more code to turn on an LED or whatever.
if (T_Packet_Data.confidence > 150)
{
Turn_On_LED;// add Signal code here
}
NOTE: if you put eather code sample in User_Rutiens.c add
#include "Tracking.h"
where Turn_On_LED is add your signaling code. you could even make the LED Flash at a verying rate depending on how confident the camera is.
|