X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=projects%2Fmicrob2010%2Fcommon%2Fi2c_commands.h;h=1168100f4cd81802e5a2c10e8fdb07c2ebc2a742;hb=54d7dccaae9fd7f9aaa640556df51e97c618cf76;hp=ea0b05ba99ac42b2ca873ddad182ba1bceea18b3;hpb=b6b61358268cccf0fe5cd3f808ceab6b8402b74c;p=aversive.git diff --git a/projects/microb2010/common/i2c_commands.h b/projects/microb2010/common/i2c_commands.h index ea0b05b..1168100 100644 --- a/projects/microb2010/common/i2c_commands.h +++ b/projects/microb2010/common/i2c_commands.h @@ -98,6 +98,13 @@ struct i2c_cmd_ballboard_set_mode { uint8_t mode; }; +#define I2C_CMD_BALLBOARD_SET_BEACON 0x04 + +struct i2c_cmd_ballboard_start_beacon { + struct i2c_cmd_hdr hdr; + uint8_t enable; +}; + /****/ /* requests and their answers */ /****/ @@ -143,6 +150,11 @@ struct i2c_ans_cobboard_status { struct i2c_req_ballboard_status { struct i2c_cmd_hdr hdr; + + /* position sent by mainboard */ + int16_t x; + int16_t y; + int16_t a; }; #define I2C_ANS_BALLBOARD_STATUS 0x83 @@ -157,6 +169,11 @@ struct i2c_ans_ballboard_status { #define I2C_BALLBOARD_STATUS_F_EXCPT 0x02 uint8_t status; + int16_t opponent_x; + int16_t opponent_y; + int16_t opponent_a; + int16_t opponent_d; + uint8_t ball_count; /* detection of cobs */