bodyCtrl.h

Go to the documentation of this file.
00001 #ifndef BODY_CTRL_H
00002 #define BODY_CTRL_H
00003 
00013 #include "wheelCtrl.h"
00014 
00015 
00019 typedef struct {
00020   wheelInfo_t *whl[2];
00021   int mtr_direction[2];       
00022   int tread_mm;
00023   int div2vel_const;
00024 } bodyInfo_t;
00025 
00026 
00027 enum MtrDirSettings {
00028   WHL_CW_FWD = +1,      
00029   WHL_CW_BACK = -1,     
00031   BODY_WHL_RIGHT = 0,
00032   BODY_WHL_LEFT = 1,
00033 
00034   DIV2VEL_CONST_SHIFT = 4,
00035 };
00036 
00037 
00038 #ifndef BODY_TREAD_MM
00039 #define BODY_TREAD_MM 290.7
00040 #endif
00041 
00042 #ifndef DEFAULT_WHL_RIGHT
00043 #define DEFAULT_WHL_RIGHT WHL_CW_BACK 
00044 #endif
00045 #ifndef DEFAULT_WHL_LEFT
00046 #define DEFAULT_WHL_LEFT WHL_CW_BACK 
00047 #endif
00048 
00049 
00050 //#include "cpp_extern_macro.h"
00051 BEGIN_C_DECLS;
00052 
00053 extern void initBodyInfo(bodyInfo_t *body,
00054                          wheelInfo_t *right, wheelInfo_t *left);
00055 extern int change_bodyDiv2Whl(int div16_vel, bodyInfo_t *body);
00056 extern void setBodyMove(bodyInfo_t *body,
00057                         int straight_mm_vel, int rotate_div16_vel);
00058 
00059 END_C_DECLS;
00060 #endif /* !BODY_CTRL_H */
00061 

Generated on Mon Apr 13 22:52:04 2009 by  doxygen 1.5.7.1