koala_GoAutomation.c File Reference

Include dependency graph for koala_GoAutomation.c:

Go to the source code of this file.

Data Structures

struct  koala_t

Defines

#define MAX_SENSOR_NUMBER   16
#define RANGE   (1024 / 2)
#define TIME_STEP   64
#define RESET_BUT   65
#define BAUDRATE   B115200

Functions

static void init (void)
void * thread (void *arg)
int thread_create (koala_t *koala)
int quit (int argc, char *argv[], void *data)
int start (int argc, char *argv[], void *data)
int stop (int argc, char *argv[], void *data)
int reset (int argc, char *argv[], void *data)
int gotogoal (int argc, char *argv[], void *data)
int askposition (int argc, char *argv[], void *data)
void handle_kill (int arg)
int help (int argc, char *argv[], void *data)
int main (int argc, char *argv[])

Variables

knet_dev_tBTComm
knet_dev_tkoala
int fd
static int quitReq = 0
static int sensors [MAX_SENSOR_NUMBER]
static float matrix [16][2]
static int sensor_number
static int range
static int phase
static int position
static int goal
static int oldEncoder [2]
static float X
static float Y
static float Theta
static int Start
koala_t BTkoala_struct
int cmd_received = 0
static kb_command_t cmds []


Define Documentation

#define BAUDRATE   B115200

Definition at line 35 of file koala_GoAutomation.c.

Referenced by main().

#define MAX_SENSOR_NUMBER   16

Definition at line 21 of file koala_GoAutomation.c.

Referenced by thread().

#define RANGE   (1024 / 2)

Definition at line 22 of file koala_GoAutomation.c.

Referenced by init().

#define RESET_BUT   65

Definition at line 25 of file koala_GoAutomation.c.

Referenced by main(), and thread().

#define TIME_STEP   64

Definition at line 24 of file koala_GoAutomation.c.


Function Documentation

int askposition ( int  argc,
char *  argv[],
void *  data 
)

Return if the Koala is on the goal or not (1 yes, 0 no).

Definition at line 417 of file koala_GoAutomation.c.

References fd, and position.

int gotogoal ( int  argc,
char *  argv[],
void *  data 
)

Go to the goal and stop.

Definition at line 401 of file koala_GoAutomation.c.

References fd, goal, phase, and position.

void handle_kill ( int  arg  ) 

Definition at line 428 of file koala_GoAutomation.c.

References koa_setSpeed().

Here is the call graph for this function:

int help ( int  argc,
char *  argv[],
void *  data 
)

Display a list of available commands.

Definition at line 453 of file koala_GoAutomation.c.

References fd, and kb_command_s::name.

static void init ( void   )  [static]

Definition at line 81 of file koala_GoAutomation.c.

References goal, koa_setPositionCounter(), oldEncoder, phase, position, RANGE, range, sensor_number, Start, Theta, X, and Y.

Here is the call graph for this function:

int main ( int  argc,
char *  argv[] 
)

int quit ( int  argc,
char *  argv[],
void *  data 
)

Quit the program.

Definition at line 348 of file koala_GoAutomation.c.

References fd, koa_setSpeed(), and quitReq.

Here is the call graph for this function:

int reset ( int  argc,
char *  argv[],
void *  data 
)

Reset the program.

Definition at line 382 of file koala_GoAutomation.c.

References fd, goal, koa_setPositionCounter(), oldEncoder, phase, position, Start, Theta, X, and Y.

Here is the call graph for this function:

int start ( int  argc,
char *  argv[],
void *  data 
)

Start the program.

Definition at line 360 of file koala_GoAutomation.c.

References fd, goal, and phase.

int stop ( int  argc,
char *  argv[],
void *  data 
)

Stop the Koala.

Definition at line 371 of file koala_GoAutomation.c.

References fd, and phase.

void* thread ( void *  arg  ) 

int thread_create ( koala_t koala  ) 

Right Arm create

Definition at line 325 of file koala_GoAutomation.c.

References koala_t::busy, koala_t::cmdWait, koala_t::cmdWaitLock, koala_t::done, koala_t::state, thread(), and koala_t::thread.

Referenced by main().

Here is the call graph for this function:


Variable Documentation

Definition at line 31 of file koala_GoAutomation.c.

Definition at line 76 of file koala_GoAutomation.c.

int cmd_received = 0

Definition at line 108 of file koala_GoAutomation.c.

Referenced by koa_lrf_task(), and main().

kb_command_t cmds[] [static]

Initial value:

 {
  { "R"                 , 0 , 0 , start },
  { "Q"                 , 0 , 0 , quit },
  { "S"                 , 0 , 0 , stop },
  { "I"                 , 0 , 0 , reset },
  { "G"                 , 0 , 0 , gotogoal },
  { "P"                 , 0 , 0 , askposition },
  { NULL                , 0 , 0 , NULL }
}

Definition at line 439 of file koala_GoAutomation.c.

int fd

Definition at line 33 of file koala_GoAutomation.c.

int goal [static]

Definition at line 59 of file koala_GoAutomation.c.

Referenced by gotogoal(), init(), reset(), start(), and thread().

Definition at line 32 of file koala_GoAutomation.c.

float matrix[16][2] [static]

Initial value:

   { {-1, 15}, {-1, 5}, {-3, 4}, {-7, 17}, {0, 0}, {0, 0}, {0, 0},
   {-10, -10}, {17, -1}, {5, -1}, {4,-3 }, {17, -7}, {0, 0}, {0, 0},
   {0, 0}, {-10, -10} }

Definition at line 48 of file koala_GoAutomation.c.

Referenced by thread().

int oldEncoder[2] [static]

Definition at line 60 of file koala_GoAutomation.c.

Referenced by init(), reset(), and thread().

int phase [static]

Definition at line 57 of file koala_GoAutomation.c.

Referenced by gotogoal(), init(), reset(), start(), stop(), and thread().

int position [static]

Definition at line 58 of file koala_GoAutomation.c.

Referenced by askposition(), gotogoal(), init(), kmot_log_task(), main(), reset(), and thread().

int quitReq = 0 [static]

Definition at line 34 of file koala_GoAutomation.c.

int range [static]

Definition at line 56 of file koala_GoAutomation.c.

Referenced by init(), and thread().

int sensor_number [static]

Definition at line 55 of file koala_GoAutomation.c.

Referenced by init(), and thread().

int sensors[MAX_SENSOR_NUMBER] [static]

Definition at line 42 of file koala_GoAutomation.c.

Referenced by thread().

int Start [static]

Definition at line 62 of file koala_GoAutomation.c.

Referenced by init(), reset(), and thread().

float Theta [static]

Definition at line 61 of file koala_GoAutomation.c.

Referenced by init(), reset(), and thread().

float X [static]

Definition at line 61 of file koala_GoAutomation.c.

Referenced by init(), reset(), and thread().

float Y [static]

Definition at line 61 of file koala_GoAutomation.c.

Referenced by init(), reset(), and thread().


Generated on Wed Dec 15 11:49:29 2010 for KoreBot Library by  doxygen 1.5.5