根据裁判系统自动设置自瞄颜色,已测试完毕
This commit is contained in:
parent
aecb82fd44
commit
e2f57ad306
|
@ -224,7 +224,7 @@ void ChassisTask() {
|
|||
chassis_cmd_recv.wz = 10.0f * chassis_cmd_recv.offset_angle * abs(chassis_cmd_recv.offset_angle);
|
||||
break;
|
||||
case CHASSIS_ROTATE: // 自旋,同时保持全向机动;当前wz维持定值,后续增加不规则的变速策略
|
||||
chassis_cmd_recv.wz = 20000;
|
||||
chassis_cmd_recv.wz = 15000;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
@ -116,14 +116,14 @@ static void CalcOffsetAngle() {
|
|||
*/
|
||||
static void RemoteControlSet() {
|
||||
// 控制底盘和云台运行模式,云台待添加,云台是否始终使用IMU数据?
|
||||
if (switch_is_down(rc_data[TEMP].rc.switch_right)) // 右侧开关状态[下],底盘跟随云台
|
||||
if (switch_is_down(rc_data[TEMP].rc.switch_right)) // 右侧开关状态[下],小陀螺
|
||||
{
|
||||
chassis_cmd_send.chassis_mode = CHASSIS_ROTATE;
|
||||
gimbal_cmd_send.gimbal_mode = GIMBAL_GYRO_MODE;
|
||||
} else if (switch_is_mid(rc_data[TEMP].rc.switch_right)) // 右侧开关状态[中],,底盘跟随云台
|
||||
{
|
||||
chassis_cmd_send.chassis_mode = CHASSIS_FOLLOW_GIMBAL_YAW;
|
||||
gimbal_cmd_send.gimbal_mode = GIMBAL_GYRO_MODE;
|
||||
} else if (switch_is_mid(rc_data[TEMP].rc.switch_right)) // 右侧开关状态[中],底盘和云台分离,底盘保持不转动
|
||||
{
|
||||
chassis_cmd_send.chassis_mode = CHASSIS_NO_FOLLOW;
|
||||
gimbal_cmd_send.gimbal_mode = GIMBAL_FREE_MODE;
|
||||
}
|
||||
// else if (switch_is_up(rc_data[TEMP].rc.switch_right))// 右侧开关状态[上],小陀螺
|
||||
// {
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
/****************************宏定义部分****************************/
|
||||
|
||||
#define REFEREE_SOF 0xA5 // 起始字节,协议固定为0xA5
|
||||
#define Robot_Red 1
|
||||
#define Robot_Blue 0
|
||||
#define Robot_Red 0
|
||||
#define Robot_Blue 1
|
||||
#define Communicate_Data_LEN 5 // 自定义交互数据长度,该长度决定了我方发送和他方接收,自定义交互数据协议更改时只需要更改此宏定义即可
|
||||
|
||||
#pragma pack(1)
|
||||
|
|
Loading…
Reference in New Issue