X-Git-Url: http://git.droids-corp.org/?p=aversive.git;a=blobdiff_plain;f=projects%2Fmicrob2010%2Fmainboard%2Fmain.h;h=abe92f23503f9b84a203322e393a7548c68dc9cf;hp=54e03b0711a7f623d5efbbe0a1d8c34b90623115;hb=5573d7668c4fe0cde51b566d086582cf3d9c7e4b;hpb=6cb7ed5a0193fd28319561715d80b72423461cc9 diff --git a/projects/microb2010/mainboard/main.h b/projects/microb2010/mainboard/main.h index 54e03b0..abe92f2 100755 --- a/projects/microb2010/mainboard/main.h +++ b/projects/microb2010/mainboard/main.h @@ -76,18 +76,24 @@ #define MATCH_TIME 89 /* decrease track to decrease angle */ -#define EXT_TRACK_MM 304.61875 +#define EXT_TRACK_MM 305.1097108 #define VIRTUAL_TRACK_MM EXT_TRACK_MM #define ROBOT_HALF_LENGTH_FRONT 130 #define ROBOT_HALF_LENGTH_REAR 120 #define ROBOT_WIDTH 320 +#ifdef HOST_VERSION +#define ROBOT_ANGLE_FRONT 0. +#else +#define ROBOT_ANGLE_FRONT 0.75 // 0.27 +#endif + /* it is a 1024 imps -> 4096 because we see 1/4 period * and diameter: 55mm -> perimeter 134mm * dist_imp_mm = 4096/134 x 10 -> 304 */ /* increase it to go further */ -#define IMP_ENCODERS 1024 +#define IMP_ENCODERS 1000 #define WHEEL_DIAMETER_MM 42.9 #define WHEEL_PERIM_MM (WHEEL_DIAMETER_MM * M_PI) #define IMP_COEF 10. @@ -211,24 +217,16 @@ struct ballboard { uint8_t ball_count; uint8_t lcob; uint8_t rcob; -}; - -/* state of beaconboard, sync'd through uart */ -struct beaconboard { - int16_t oppx; - int16_t oppy; - int16_t oppa; - int16_t oppd; - uint16_t posx; - uint16_t posy; - uint16_t posa; /* between 0 and 3600 */ + int16_t opponent_x; + int16_t opponent_y; + int16_t opponent_a; + int16_t opponent_d; }; extern struct genboard gen; extern struct mainboard mainboard; extern volatile struct cobboard cobboard; extern volatile struct ballboard ballboard; -extern volatile struct beaconboard beaconboard; /* start the bootloader */ void bootloader(void);