Main Page | Data Structures | Directories | File List | Data Fields | Globals

drive.c File Reference

#include <config.h>
#include <stdio.h>
#include <sys/time.h>
#include <time.h>
#include <errno.h>
#include <string.h>
#include <math.h>
#include <drivers/drivers.h>
#include <cartcomm/comm.h>
#include <conf.h>
#include <debug.h>

Include dependency graph for drive.c:

Include dependency graph

Go to the source code of this file.

Defines

#define DEBUG_LEVEL   2
#define SLEEP_OVERHEAD_US   850

Functions

void drive (drivefunc_t func, void *data)
 The main driving loop.


Define Documentation

#define DEBUG_LEVEL   2
 

Definition at line 14 of file drive.c.

#define SLEEP_OVERHEAD_US   850
 

Definition at line 19 of file drive.c.


Function Documentation

void drive drivefunc_t  func,
void *  data
 

The main driving loop.

Parameters:
func function to on each update
data pointer to pass to func

Definition at line 25 of file drive.c.

References cartcomm_connect_sync(), cartcomm_decode_msg(), cartcomm_disconnect(), cartcomm_encode_msg(), cartcomm_read_msg(), cartcomm_send_msg(), cframe_t, cframe::cmd_irad, cframe::cmd_mode, cframe::cmd_speed, COMM_PERIOD_US, conf, cframe::cur_irad, DEBUG1, DEBUG2, DEBUG3, conf_t::port, cframe::seqno, conf_t::server, and conf_t::steering_offset.

Referenced by main().

Here is the call graph for this function:


Generated on Thu Sep 6 13:13:17 2007 for driver by  doxygen 1.3.9.1