44 #include "playerconfig.h"
50 #define IMAGE_WIDTH 174 // the width of the frame camera sends
51 #define IMAGE_HEIGHT 143 // the height of the frame camera sends
52 #define CONTRAST 5 // camera's contrast register #
53 #define BRIGHTNESS 6 // camera's brightness register #
54 #define COLORMODE 18 // camera's colormode register #
55 #define RGB_AWT_ON 44 // camera's RGB auto white balance on
56 #define RGB_AWT_OFF 40 // camera'sRGB auto white balance off
57 #define YCRCB_AWT_ON 36 // camera'sYCrCb auto white balance on
58 #define YCRCB_AWT_OFF 32 // camera'sYCrCb auto white balance off
59 #define AUTOGAIN 19 // camera's autogain register #
60 #define AUTOGAIN_ON 33 // camera's autogain on
61 #define AUTOGAIN_OFF 32 // camera's autogain off
62 #define ZERO_POSITION 128 // servos' middle position as defiend by camera
63 #define MIN_RGB 16 // camera's min rgb value
64 #define MAX_RGB 240 // camera's max rgb value
65 #define T_PACKET_LENGTH 50 // max length of T packet that camera returns
66 #define F_PACKET_LENGTH 37474 // max length of F packet that camera returns
74 int middle_x, middle_y;
160 int get_t_packet(
int fd,
packet_t *tpacket);
162 int get_bytes(
int fd,
char *buf,
size_t len);
163 int open_port(
char *devicepath);
164 void close_port(
int fd);
165 void read_t_packet(
int fd,
char *tpackChars);
166 int read_f_packet (
int fd,
char *fpackChars);
167 int set_t_packet(
packet_t *tpacket,
char tpack_chars[] );
168 int set_f_packet (
packet_f *fpacket,
char fpack_chars[],
int chan_num);
169 int set_servo_position(
int fd,
int servo_num,
int angle);
170 int get_servo_position(
int fd,
int servo_num);
171 void stop_tracking(
int fd);
172 int write_check(
int fd,
char *msg,
int respond_size);
173 int poll_mode(
int fd,
int on);
174 void make_command(
char *cmd,
int *n,
size_t size,
char *fullCommand);
175 int auto_servoing(
int fd,
int on);
177 int read_image (
int fd,
int chan_num,
packet_f *fpacket);
Definition: cmvision.h:105