/*
    Robot Interface Remote Client
    (C) 2006 Jason Hunt
    nulluser@gmail.com

    file: robot.h
*/

#ifndef ROBOT_H
#define ROBOT_H

#define SERIAL_RECV_SIZE 20

typedef struct 
{
   unsigned char l_speed;
   unsigned char r_speed;

   unsigned char max_l_speed;
   unsigned char max_r_speed;

   unsigned char l_dir;
   unsigned char r_dir;
   
   unsigned char l_light;
   unsigned char r_light;
   
   unsigned char pan;
   unsigned char tilt;
   
   unsigned int analog[8];
   
} robot_data_type;


void robot_start( void );
void robot_update( void );
void robot_reset( void );
void robot_clear_values( void );
void request_sensor_data( void );
int robot_sensor_data( unsigned char * data, unsigned int size );
void robot_update_pan_tilt(unsigned int x, unsigned int y);

extern robot_data_type robot_data;

#endif

