From 7825e6e55fe530534a69b3024bbb78cfeb77469c Mon Sep 17 00:00:00 2001 From: zcj <2487150395@qq.com> Date: Thu, 16 May 2024 17:55:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=A3=81=E5=88=A4=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F=E4=B8=B2=E5=8F=A3=E5=91=BD=E4=BB=A4=E7=A0=81=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E6=AE=B5=E9=95=BF=E5=BA=A6=EF=BC=8C=E8=A7=A3=E5=86=B3?= =?UTF-8?q?=E7=BC=93=E5=86=B2=E5=8A=9F=E7=8E=87=E6=8E=A5=E6=94=B6=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/robot_def.h | 2 +- modules/referee/referee_protocol.h | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/application/robot_def.h b/application/robot_def.h index d79330c..eaee36b 100644 --- a/application/robot_def.h +++ b/application/robot_def.h @@ -29,7 +29,7 @@ #define YAW_CHASSIS_ALIGN_ECD 5.482276 // 云台和底盘对齐指向相同方向时的电机position值,需要加上PI,因为单圈角度计算里增加了PI若对云台有机械改动需要修改 #define YAW_ECD_GREATER_THAN_4096 0 // ALIGN_ECD值是否大于4096,是为1,否为0;用于计算云台偏转角度 #define PITCH_HORIZON_ECD 3412 // 云台处于水平位置时编码器值,若对云台有机械改动需要修改 -#define PITCH_MAX_ANGLE 13 // 云台竖直方向最大角度 (注意反馈如果是陀螺仪,则填写陀螺仪的角度) +#define PITCH_MAX_ANGLE 15 // 云台竖直方向最大角度 (注意反馈如果是陀螺仪,则填写陀螺仪的角度) #define PITCH_MIN_ANGLE -35 // 云台竖直方向最小角度 (注意反馈如果是陀螺仪,则填写陀螺仪的角度) // 发射参数 #define ONE_BULLET_DELTA_ANGLE 1933.272 // 发射一发弹丸拨盘转动的距离,由机械设计图纸给出 diff --git a/modules/referee/referee_protocol.h b/modules/referee/referee_protocol.h index 86cefb7..eb542c3 100644 --- a/modules/referee/referee_protocol.h +++ b/modules/referee/referee_protocol.h @@ -90,20 +90,20 @@ typedef enum /* 命令码数据段长,根据官方协议来定义长度,还有自定义数据长度 */ typedef enum { - LEN_game_state = 3, // 0x0001 + LEN_game_state = 11, // 0x0001 LEN_game_result = 1, // 0x0002 - LEN_game_robot_HP = 2, // 0x0003 + LEN_game_robot_HP = 32, // 0x0003 LEN_event_data = 4, // 0x0101 LEN_supply_projectile_action = 4, // 0x0102 - LEN_game_robot_state = 27, // 0x0201 - LEN_power_heat_data = 14, // 0x0202 + LEN_game_robot_state = 13, // 0x0201 + LEN_power_heat_data = 16, // 0x0202 LEN_game_robot_pos = 16, // 0x0203 - LEN_buff_musk = 1, // 0x0204 - LEN_aerial_robot_energy = 1, // 0x0205 + LEN_buff_musk = 6, // 0x0204 + LEN_aerial_robot_energy = 2, // 0x0205 LEN_robot_hurt = 1, // 0x0206 LEN_shoot_data = 7, // 0x0207 LEN_receive_data = 6 + Communicate_Data_LEN, // 0x0301 - LEN_self_control = 12, // 0x0303 + LEN_self_control = 15, // 0x0303 LEN_remote_control = 12, // 0x0304 } JudgeDataLength_e;