X-Git-Url: http://git.droids-corp.org/?p=aversive.git;a=blobdiff_plain;f=projects%2Fmicrob2010%2Fmainboard%2Fmain.h;h=c248644f85e356ba22dff3c2f7e20fa6c7833ebc;hp=7f210588b0418ebb4db2891ce689d688fdc09101;hb=09e0cfb842943982e9fa3c4792c097bf4be25360;hpb=1714f4ee916fca95ce24120ea6e698237913f947 diff --git a/projects/microb2010/mainboard/main.h b/projects/microb2010/mainboard/main.h index 7f21058..c248644 100755 --- a/projects/microb2010/mainboard/main.h +++ b/projects/microb2010/mainboard/main.h @@ -66,16 +66,20 @@ #define IMP_COEF 10. #define DIST_IMP_MM (((IMP_ENCODERS*4) / WHEEL_PERIM_MM) * IMP_COEF) -#define LEFT_ENCODER ((void *)1) #define RIGHT_ENCODER ((void *)0) +#define LEFT_ENCODER ((void *)1) #define LEFT_COBROLLER_ENCODER ((void *)2) #define RIGHT_COBROLLER_ENCODER ((void *)3) -#define LEFT_PWM ((void *)&gen.pwm1_4A) -#define RIGHT_PWM ((void *)&gen.pwm2_4B) +#define RIGHT_PWM ((void *)&gen.pwm1_4A) +#define LEFT_PWM ((void *)&gen.pwm2_4B) #define LEFT_COBROLLER_PWM ((void *)&gen.pwm3_1A) #define RIGHT_COBROLLER_PWM ((void *)&gen.pwm4_1B) +#define SUPPORT_BALLS_R_SERVO ((void *)&gen.servo2) +#define SUPPORT_BALLS_L_SERVO ((void *)&gen.servo3) + + /** ERROR NUMS */ #define E_USER_STRAT 194 #define E_USER_I2C_PROTO 195 @@ -111,7 +115,7 @@ struct genboard { struct pwm_ng servo2; struct pwm_ng servo3; struct pwm_ng servo4; - + /* ax12 interface */ AX12 ax12; @@ -161,13 +165,18 @@ struct mainboard { /* state of cobboard, synchronized through i2c */ struct cobboard { - uint8_t mode; + uint8_t mode; uint8_t status; + int16_t left_cobroller_speed; + int16_t right_cobroller_speed; + uint8_t cob_count; }; /* state of ballboard, synchronized through i2c */ struct ballboard { + uint8_t mode; uint8_t status; + uint8_t ball_count; }; extern struct genboard gen;