diff --git a/README.md b/README.md index 08cc9f9..a05dafd 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,12 @@ # New-Infantry-C-Board-Legacy @Peng Ge的全向轮步兵代码,基于C板,使用标准库编写 -编译器使用Keil V5 + +编译器使用ARMCC V5 + +该代码为RMUL2026 最终上场版本 + +该代码已过时,仅用于参考使用,不建议继续维护 当前待实现目标: 陀螺仪漂移优化 diff --git a/云台/云台/CarBody/Gimbal.c b/云台/云台/CarBody/Gimbal.c index b9c53a5..a45d579 100644 --- a/云台/云台/CarBody/Gimbal.c +++ b/云台/云台/CarBody/Gimbal.c @@ -24,6 +24,8 @@ KFP kfp_PITCH={0.02,0,0,0,0.001,0.543};//卡尔曼滤波器结构体 uint8_t Gimbal_FrictionWheelFlag;//云台小陀螺标志位,云台开摩擦轮标志位 extern int KP , KI , KD; +extern float Visual_Yaw,Visual_Pitch; +extern uint8_t Visual_ReceiveFlag; float use_yaw=0; @@ -129,18 +131,18 @@ void Gimbal_CleanPID(void) */ void Gimbal_PitchControl(void) { - float use_pitch=0,lastpitch=0,lastyaw=0; + float use_pitch=0; if(Remote_StartFlag==2)Gimbal_PitchAnglePositionPID.Need_Value=0;//遥控器刚建立连接时,复位Pitch轴角度 - if(((Remote_RxData.Remote_L_UD>1050 && RefereeSystem_Status==0) || (1024+Remote_RxData.Remote_Mouse_DU*3)<1000) && GM6020_MotorStatus[Gimbal_PitchMotor-0x205].Position>Pitch_GM6020PositionUpperLinit) + if(((Remote_RxData.Remote_L_UD>1050 && RefereeSystem_Status==0) || (1024+Remote_RxData.Remote_Mouse_DU*3)>1040) && GM6020_MotorStatus[Gimbal_PitchMotor-0x205].Position>Pitch_GM6020PositionUpperLinit) { Gimbal_PitchAnglePositionPID.Need_Value-=Gimbal_LeverSpeedMapRate/8192.0f*360.0f;//通过遥控器或者鼠标获取俯仰情况 //if(GM6020_MotorStatus[Gimbal_PitchMotor-0x205].Angle<=Pitch_GM6020PositionUpperLinit) //Gimbal_PitchAnglePositionPID.Need_Value=0; } - else if(((Remote_RxData.Remote_L_UD<1000 && RefereeSystem_Status==0) || (1024+Remote_RxData.Remote_Mouse_DU*3)>1050) && GM6020_MotorStatus[Gimbal_PitchMotor-0x205].Position=Pitch_GM6020PositionLowerLinit) @@ -149,18 +151,18 @@ void Gimbal_PitchControl(void) if(Remote_RxData.Remote_LS==2 || Remote_RxData.Remote_Mouse_KeyR==1 )//自瞄,补偿角度 { - use_pitch=0.5f*Visual_Pitch; - use_yaw=0.5f*Visual_Yaw; + use_pitch=1.5f*Visual_Pitch; + use_yaw=0.5f*-Visual_Yaw; + //if(Visual_ReceiveFlag==1)UART2_Printf("Y:%f,P:%f\n",Visual_Yaw,Visual_Pitch);//*0.0030518509475997f //pitch - if(GM6020_MotorStatus[Gimbal_PitchMotor-0x205].Position>Pitch_GM6020PositionUpperLinit && Visual_Pitch>0) - Gimbal_PitchAnglePositionPID.Need_Value=AttitudeAlgorithms_DegRoll-(float)use_pitch-lastpitch; - if(GM6020_MotorStatus[Gimbal_PitchMotor-0x205].PositionPitch_GM6020PositionUpperLinit && Visual_Pitch!=0) Gimbal_PitchAnglePositionPID.Need_Value=AttitudeAlgorithms_DegRoll-(float)use_pitch; use_pitch=0; Remote_RxData.Remote_Mouse_KeyPushR=0; Remote_RxData.Remote_LS=0; - - Visual_Pitch = 0; + //UART2_Printf("Y:%f,P:%f\n",Visual_Yaw,Visual_Pitch); + Visual_Pitch=0; + Visual_Yaw=0; Visual_ReceiveFlag=0; } @@ -196,14 +198,14 @@ void Gimbal_YawControl(void) if(Remote_StartFlag==2) Gimbal_YawAnglePositionPID.Need_Value=AttitudeAlgorithms_DegYaw;//遥控器刚建立连接时,复位Yaw轴角度 - if((Remote_RxData.Remote_L_RL>1050 && RefereeSystem_Status==0) || 1024+PC_Spin*PC_Mouse_RLSensitivity>1050 || use_yaw !=0 )//根据摇杆改变偏航 + if((Remote_RxData.Remote_L_RL>1050 && RefereeSystem_Status==0) || 1024+PC_Spin*PC_Mouse_RLSensitivity>1028 || use_yaw !=0 )//根据摇杆改变偏航 { if(PC_Spin==0) Gimbal_YawAnglePositionPID.Need_Value-=Gimbal_LeverSpeedMapRate*Gimbal_YawPitchSpeedRate*Gimbal_YawPitchSpeedRate*0.0439453125f*((Remote_RxData.Remote_L_RL-1024)/660.0f)+(float)use_yaw; else Gimbal_YawAnglePositionPID.Need_Value-=Gimbal_LeverSpeedMapRate*Gimbal_YawPitchSpeedRate*Gimbal_YawPitchSpeedRate*0.0439453125f*(PC_Spin*PC_Mouse_RLSensitivity/660.0f*2)+(float)use_yaw; } - else if((Remote_RxData.Remote_L_RL<1000 && RefereeSystem_Status==0) || 1024+PC_Spin*PC_Mouse_RLSensitivity<1000 || use_yaw !=0) + else if((Remote_RxData.Remote_L_RL<1000 && RefereeSystem_Status==0) || 1024+PC_Spin*PC_Mouse_RLSensitivity<1022 || use_yaw !=0) { if(PC_Spin==0) Gimbal_YawAnglePositionPID.Need_Value+=Gimbal_LeverSpeedMapRate*Gimbal_YawPitchSpeedRate*Gimbal_YawPitchSpeedRate*0.0439453125f*((1024-Remote_RxData.Remote_L_RL)/660.0f)+(float)use_yaw; @@ -211,9 +213,9 @@ void Gimbal_YawControl(void) Gimbal_YawAnglePositionPID.Need_Value-=Gimbal_LeverSpeedMapRate*Gimbal_YawPitchSpeedRate*Gimbal_YawPitchSpeedRate*0.0439453125f*(PC_Spin*PC_Mouse_RLSensitivity/660.0f*2)+(float)use_yaw; } - Visual_Yaw=0; use_yaw=0; - + + //串级PID闭环Yaw角 PID_PositionCalc(&Gimbal_YawAnglePositionPID,AttitudeAlgorithms_DegYaw); Gimbal_YawAngleSpeedPID.Need_Value=Gimbal_YawAnglePositionPID.OUT; diff --git a/云台/云台/CarBody/Visual.c b/云台/云台/CarBody/Visual.c index 92ba8ca..affd6c6 100644 --- a/云台/云台/CarBody/Visual.c +++ b/云台/云台/CarBody/Visual.c @@ -16,8 +16,8 @@ uint32_t Visual_Time=0;//视觉数据send时间 uint32_t Time_Out=0;//超时时间 uint32_t SystemCoreClock84=84000000; //84M int KP , KI , KD; -int yaw=0 , pitch=0; -static char dataType; // 存储类型字段('r'/'b'/'u') +int yaw=0 , pitch=0 , roll=0 ,delay=0; + uint8_t USART_RX_BUF[100];//视觉数据jieshou缓冲区 extern PID_PositionInitTypedef Gimbal_YawAnglePositionPID,Gimbal_YawAngleSpeedPID,Gimbal_PitchAnglePositionPID,Gimbal_PitchAngleSpeedPID;//Pitch轴GM6020电机PID; @@ -44,15 +44,16 @@ void Visual_Init(void) } void Visual_SendData(void) { - /*SendData MCUMessage; + /* + SendData MCUMessage; MCUMessage.curr_yaw=AttitudeAlgorithms_DegYaw; MCUMessage.curr_pitch=AttitudeAlgorithms_DegPitch; MCUMessage.state=(uint8_t)('a'); MCUMessage.mark=(uint8_t)(0); MCUMessage.anti_top=(uint8_t)(0); MCUMessage.enemy_color=(uint8_t)(1); - MCUMessage.delta_x=(uint8_t)(1); - MCUMessage.delta_y=(uint8_t)(1); + MCUMessage.delta_x=(uint8_t)(0); + MCUMessage.delta_y=(uint8_t)(0); UART2_SendArray((uint8_t *)&MCUMessage, sizeof(MCUMessage));*/ //UART2_SendArray((uint8_t *)&MCUMessage, sizeof(MCUMessage)); /* @@ -60,24 +61,29 @@ void Visual_SendData(void) UART2_SendByte((float)AttitudeAlgorithms_DegRoll); //UART2_SendByte((float)AttitudeAlgorithms_DegPitch); - UART2_SendByte((uint8_t)0); + //UART2_SendByte((uint8_t)0); UART2_SendByte((uint8_t)'a'); UART2_SendByte((uint8_t)0); UART2_SendByte((uint8_t)0); UART2_SendByte((uint8_t)1); - UART2_SendByte((uint8_t)1); -*/ + UART2_SendByte((uint8_t)0); + UART2_SendByte((uint8_t)0); + */ +/* UART2_Printf("%lld",GM6020_MotorStatus[GM6020_2-0x205].Position); UART2_Printf(",%f",Gimbal_PitchAnglePositionPID.Need_Value); UART2_Printf(",%f",Gimbal_PitchAngleSpeedPID.Need_Value); UART2_Printf(",%f\n",Gimbal_PitchAngleSpeedPID.OUT); - //UART2_Printf("%f,%f,%f\n",AttitudeAlgorithms_DegPitch,AttitudeAlgorithms_DegYaw,BMI088_Temperature); - //UART2_Printf("%f,%f,%f,%f,%f,%f\n",BMI088_Gyro[0],BMI088_Gyro[1],BMI088_GyroZeroOffset[0],BMI088_GyroZeroOffset[1],BMI088_GyroWithoutOffset[0],BMI088_GyroWithoutOffset[1]); + */ + + + UART2_Printf("%f %f %c %d %d %d %d %d\n",AttitudeAlgorithms_DegPitch,AttitudeAlgorithms_DegYaw,'a',0,0,1,0,0); + //UART2_SendByte((uint8_t)'\n'); //if(Visual_ReceiveFlag == 1) - //UART2_Printf("%f %f %f %f \n",Visual_Yaw,Visual_Pitch,Visual_GetRoll,Visual_GetDelay);//*0.0030518509475997f + //UART2_Printf("Y:%f,P:%f\n",Visual_Yaw,Visual_Pitch);//*0.0030518509475997f //if(Visual_ReceiveFlag == 1) //UART2_Printf("%f %f %f %f\n",Visual_Yaw,Visual_Pitch,AttitudeAlgorithms_DegYaw);//*0.0030518509475997f @@ -110,7 +116,132 @@ void USART1_IRQHandler(void) USART_ClearITPendingBit(USART1,USART_IT_RXNE);//清除接收中断标志位 } +// 全局变量(需在.h文件中声明) + +uint8_t Visual_ReceiveFlag = 0; // 接收完成标志 + + +// 静态变量(函数内部状态) +static char Visual_RxBuffer[32]; // 接收缓冲区(足够容纳最长帧) +static uint8_t RxState = 0; // 状态机:0-等待s,1-接收数据,2-解析 +static uint8_t RxIndex = 0; // 缓冲区索引 +static uint32_t RxTimeoutTick = 0;// 超时计时器(毫秒) + //Visual_Yaw = -(float)yaw; + //Visual_Pitch = -(float)pitch; + + +// 全局变量(需在.h文件中声明) +char Visual_Type = '\0'; // 存储类型(r/b/u) + void Visual_Trans(void) { + +// 静态变量(函数内部状态) +static char Visual_RxBuffer[32]; // 接收缓冲区(足够容纳最长帧) +static uint8_t RxState = 0; // 状态机:0-等待#,1-接收数据,2-解析 +static uint8_t RxIndex = 0; // 缓冲区索引 +static uint32_t RxTimeoutTick = 0;// 超时计时器(毫秒) + + // 每次调用处理一个UART接收字节(UART2_RxData为当前接收的字节) + uint8_t rx_byte = UART2_RxData; + + // 接收新数据时重置超时计时器 + RxTimeoutTick = 0; + + switch (RxState) { + case 0: // 等待帧头's' + if (rx_byte == 's') { + RxState = 1; + RxIndex = 0; + memset(Visual_RxBuffer, 0, sizeof(Visual_RxBuffer)); // 清空缓冲区 + } + break; + + case 1: // 接收有效数据(直到遇到帧尾'e') + if (rx_byte == 'e') { + RxState = 2; + } else { + // 限制缓冲区大小,防止溢出(预留1字节给结束符'\0') + if (RxIndex < sizeof(Visual_RxBuffer) - 1) { + Visual_RxBuffer[RxIndex++] = rx_byte; + } else { + // 缓冲区满,强制复位(防止内存溢出) + RxState = 0; + RxIndex = 0; + } + } + break; + + case 2: // 解析接收的字符串 + { + // 有效数据格式:"207 -4 0 0"(需包含4个字段) + char *token = strtok(Visual_RxBuffer, " "); // 按空格分割 + uint8_t field_idx = 0; + uint8_t parse_ok = 1; // 解析成功标志 + + char type = '\0'; + + + while (token != NULL && field_idx < 4) { // 只处理前4个字段 + switch (field_idx) { + case 0: // 校验包头's'(ASCII:0x73) + yaw = atoi(token); + break; + case 1: // 提取类型(r/b/u) + pitch = atoi(token); + break; + case 2: // 转换yaw(字符串→int) + roll = atoi(token); + break; + case 3: // 转换pitch(字符串→int) + delay = atoi(token); + break; + } + token = strtok(NULL, " "); + field_idx++; + } + + + // 解析成功的条件:字段完整且包头/类型正确 + if (parse_ok && field_idx == 4) { + Visual_Type = type; + Visual_GetYaw = yaw; + Visual_GetPitch = pitch; + + // 角度转换(根据实际需求调整系数) + Visual_Yaw = (float)yaw * 0.03051850947599f; + Visual_Pitch = (float)pitch * 0.03051850947599f; + + Visual_ReceiveFlag = 1; // 置位完成标志 + } + + // 解析完成,回到初始状态 + RxState = 0; + RxIndex = 0; + } + break; + + default: + // 异常状态复位 + RxState = 0; + RxIndex = 0; + break; + } +} + +/* +void Visual_Trans(void) { + +// 全局变量(需在.h文件中声明) + +uint8_t Visual_ReceiveFlag = 0; // 接收完成标志 + +static char dataType; // 存储类型字段('r'/'b'/'u') + +// 静态变量(函数内部状态) +static char Visual_RxBuffer[32]; // 接收缓冲区(足够容纳最长帧) +static uint8_t RxState = 0; // 状态机:0-等待s,1-接收数据,2-解析 +static uint8_t RxIndex = 0; // 缓冲区索引 +static uint32_t RxTimeoutTick = 0;// 超时计时器(毫秒) //Visual_Yaw = -(float)yaw; //Visual_Pitch = -(float)pitch; @@ -201,8 +332,8 @@ static uint32_t RxTimeoutTick = 0;// 超时计时器(毫秒) Visual_GetPitch = pitch; // 角度转换(根据实际需求调整系数) - Visual_Yaw = -(float)yaw * 0.03051850947599f; - Visual_Pitch = -(float)pitch * 0.03051850947599f; + Visual_Yaw = (float)yaw * 0.03051850947599f; + Visual_Pitch = (float)pitch * 0.03051850947599f; Visual_ReceiveFlag = 1; // 置位完成标志 } @@ -220,13 +351,10 @@ static uint32_t RxTimeoutTick = 0;// 超时计时器(毫秒) break; } } - +*/ /* void Visual_Trans(void){ - - - static int Visual_RxHEXPacket[20]; //char Message[10]; @@ -247,7 +375,6 @@ void Visual_Trans(void){ { Visual_RxHEXPacket[pRxHEXState]=UART2_RxData;//接收数据 - if(pRxHEXState==7)//接收数据长度达到3 { @@ -260,7 +387,6 @@ void Visual_Trans(void){ pRxHEXState++; } - } else if(RxHEXState==2)//模式2-等待包尾 @@ -273,20 +399,19 @@ void Visual_Trans(void){ Visual_GetPitch=((uint8_t)Visual_RxHEXPacket[2]<<8 | Visual_RxHEXPacket[3]); Visual_GetRoll=((uint8_t)Visual_RxHEXPacket[4]<<8 | Visual_RxHEXPacket[5]); Visual_GetDelay=((uint8_t)Visual_RxHEXPacket[6]<<8 | Visual_RxHEXPacket[7]); - Visual_Pitch=Visual_GetPitch*0.003051850947599f+Visual_GetRoll*0.049f/(30.0f*3.1415926535f); - Visual_Yaw=-Visual_GetYaw*0.003051850947599f; - // UART2_Printf("0x%.2x 0x%.2x\n",Visual_RxHEXPacket[0],Visual_RxHEXPacket[1]); + Visual_Pitch=(Visual_GetPitch)*0.0005051850947599f/*+Visual_GetRoll*0.049f/(30.0f*3.1415926535f)*/; + // Visual_Yaw=(Visual_GetYaw)*0.0003051850947599f; + //UART2_Printf("0x%.2x 0x%.2x\n",Visual_RxHEXPacket[0],Visual_RxHEXPacket[1]); //Visual_Yaw=(int16_t)((uint16_t)Visual_RxHEXPacket[0]<<8 | Visual_RxHEXPacket[1])*0.01f; //Visual_Pitch=(int16_t)((uint16_t)Visual_RxHEXPacket[2]<<8 | Visual_RxHEXPacket[3])*0.01f; - Visual_ReceiveFlag=1; - RxHEXState=0;//回到模式0 - //Buzzer_Time(M4,1000);//蜂鸣器发声 - } + //Visual_ReceiveFlag=1; + //RxHEXState=0;//回到模式0 + //Buzzer_Time(M4,1000);//蜂鸣器发声 + //} - } +// } -} - */ \ No newline at end of file +//} diff --git a/云台/云台/CarBody/Visual.h b/云台/云台/CarBody/Visual.h index 169f1c9..b18f6f2 100644 --- a/云台/云台/CarBody/Visual.h +++ b/云台/云台/CarBody/Visual.h @@ -6,8 +6,12 @@ extern uint8_t Visual_ReceiveFlag;//视觉数据接收完成标志位 #define SYSTICK_1MS ((uint32_t)1000) +#define ENEMY_BLUE 0 +#define ENEMY_RED 1 + ///发送数据 +#pragma pack(push, 1) typedef struct { float curr_yaw; // 当前云台yaw角度 @@ -19,6 +23,7 @@ typedef struct int delta_x; // 能量机关x轴补偿量 int delta_y; // 能量机关y轴补偿量 }SendData; +#pragma pack(pop) //接受数据 typedef struct diff --git a/云台/云台/Control/WaveFiltering_Kalman_Filtering.c b/云台/云台/Control/WaveFiltering_Kalman_Filtering.c index 9cd23d7..1a48d94 100644 --- a/云台/云台/Control/WaveFiltering_Kalman_Filtering.c +++ b/云台/云台/Control/WaveFiltering_Kalman_Filtering.c @@ -10,7 +10,7 @@ */ float kalmanFilter(KFP *kfp,float input) { - float pDst,pDst1=1.0f; + //float pDst,pDst1=1.0f; //预测协方差方程:k时刻系统估算协方差 = k-1时刻的系统协方差 + 过程噪声协方差 //arm_add_f32(&kfp->LastP, &kfp->Q, &kfp->Now_P, 1); kfp->Now_P = kfp->LastP + kfp->Q; diff --git a/云台/云台/Function/AttitudeAlgorithms.c b/云台/云台/Function/AttitudeAlgorithms.c index 40c01b5..810e9e9 100644 --- a/云台/云台/Function/AttitudeAlgorithms.c +++ b/云台/云台/Function/AttitudeAlgorithms.c @@ -105,9 +105,9 @@ void TIM1_TRG_COM_TIM11_IRQHandler(void) BMI088_GyroWithoutOffset[1]=BMI088_Gyro[1]+BMI088_GyroZeroOffset[1]; BMI088_GyroWithoutOffset[2]=BMI088_Gyro[2]; //debug - //AHRS_update(AttitudeAlgorithms_q,0.001f,BMI088_Gyro,BMI088_Accel,IST8310_MagneticField); + AHRS_update(AttitudeAlgorithms_q,0.001f,BMI088_GyroWithoutOffset,BMI088_Accel,IST8310_MagneticField); - AHRS_update(AttitudeAlgorithms_q,0.001f,BMI088_GyroWithoutOffset,BMI088_Accel,fake_IST8310); + //AHRS_update(AttitudeAlgorithms_q,0.001f,BMI088_GyroWithoutOffset,BMI088_Accel,fake_IST8310); get_angle(AttitudeAlgorithms_q,&AttitudeAlgorithms_RadYaw,&AttitudeAlgorithms_RadPitch,&AttitudeAlgorithms_RadRoll); AttitudeAlgorithms_LastDegYaw=AttitudeAlgorithms_ThisDegYaw; diff --git a/云台/云台/Objects/Project.axf b/云台/云台/Objects/Project.axf index 5c59314..6b66659 100644 Binary files a/云台/云台/Objects/Project.axf and b/云台/云台/Objects/Project.axf differ diff --git a/云台/云台/Objects/Project.build_log.htm b/云台/云台/Objects/Project.build_log.htm index d0e87f7..487f916 100644 --- a/云台/云台/Objects/Project.build_log.htm +++ b/云台/云台/Objects/Project.build_log.htm @@ -17,112 +17,22 @@ Library Manager: ArmAr.exe V5.06 update 7 (build 960) Hex Converter: FromElf.exe V5.06 update 7 (build 960) CPU DLL: SARMCM3.DLL V5.43.0.0 Dialog DLL: DCM.DLL V1.17.5.0 -Target DLL: CMSIS_AGDI.dll V1.33.24.0 +Target DLL: STLink\ST-LINKIII-KEIL_SWO.dll V3.3.1.0 Dialog DLL: TCM.DLL V1.56.6.0

Project:

-C:\Users\LSMushui\Desktop\RM\test-rope\̨\̨\Project.uvprojx -Project File Date: 11/02/2025 +C:\Users\LSMushui\Desktop\RM\workspace\Infantry-C-Board-from-PG\̨\̨\Project.uvprojx +Project File Date: 03/24/2026

Output:

*** Using Compiler 'V5.06 update 7 (build 960)', folder: 'C:\Users\LSMushui\AppData\Local\Keil_v5\ARM\ARMCC\Bin' -Rebuild target 'Target 1' -assembling startup_stm32f40_41xxx.s... -compiling system_stm32f4xx.c... -compiling misc.c... -compiling stm32f4xx_crc.c... -compiling stm32f4xx_cec.c... -compiling stm32f4xx_cryp_des.c... -compiling stm32f4xx_fmpi2c.c... -compiling stm32f4xx_cryp_tdes.c... -compiling stm32f4xx_can.c... -compiling stm32f4xx_cryp.c... -compiling stm32f4xx_exti.c... -compiling stm32f4xx_adc.c... -compiling stm32f4xx_fsmc.c... -compiling stm32f4xx_dbgmcu.c... -compiling stm32f4xx_flash_ramfunc.c... -compiling stm32f4xx_dfsdm.c... -compiling stm32f4xx_dsi.c... -compiling stm32f4xx_dac.c... -compiling stm32f4xx_gpio.c... -compiling stm32f4xx_dma.c... -compiling stm32f4xx_dma2d.c... -compiling stm32f4xx_flash.c... -compiling stm32f4xx_dcmi.c... -compiling stm32f4xx_cryp_aes.c... -compiling stm32f4xx_hash.c... -compiling stm32f4xx_hash_md5.c... -compiling stm32f4xx_hash_sha1.c... -compiling stm32f4xx_iwdg.c... -compiling stm32f4xx_lptim.c... -compiling stm32f4xx_i2c.c... -compiling stm32f4xx_qspi.c... -compiling stm32f4xx_rng.c... -compiling stm32f4xx_pwr.c... -compiling stm32f4xx_ltdc.c... -compiling stm32f4xx_sai.c... -compiling stm32f4xx_rcc.c... -compiling stm32f4xx_sdio.c... -compiling stm32f4xx_spdifrx.c... -compiling stm32f4xx_rtc.c... -compiling stm32f4xx_syscfg.c... -compiling TIM.c... -compiling stm32f4xx_spi.c... -compiling Delay.c... -compiling stm32f4xx_wwdg.c... -compiling stm32f4xx_usart.c... -compiling AHRS_middleware.c... -compiling UART.c... -compiling user_lib.c... -compiling stm32f4xx_tim.c... -compiling MyI2C.c... -compiling WaveFiltering_Kalman_Filtering.c... -Control\WaveFiltering_Kalman_Filtering.c(13): warning: #177-D: variable "pDst" was declared but never referenced - float pDst,pDst1=1.0f; -Control\WaveFiltering_Kalman_Filtering.c(13): warning: #177-D: variable "pDst1" was declared but never referenced - float pDst,pDst1=1.0f; -Control\WaveFiltering_Kalman_Filtering.c: 2 warnings, 0 errors -compiling CAN.c... -compiling LED.c... -compiling Buzzer.c... -compiling Remote.c... -compiling IST8310.c... -compiling Laser.c... -compiling BMI088.c... -compiling M3508.c... -compiling GM6020.c... -compiling M2006.c... -compiling LinkCheck.c... -compiling Warming.c... +Build target 'Target 1' compiling CToC.c... -compiling CloseLoopControl.c... -compiling AttitudeAlgorithms.c... -compiling IMUTemperatureControl.c... -compiling PID.c... -compiling RefereeSystem.c... -compiling Keyboard.c... compiling Gimbal.c... -CarBody\Gimbal.c(132): warning: #177-D: variable "lastyaw" was declared but never referenced - float use_pitch=0,lastpitch=0,lastyaw=0; -CarBody\Gimbal.c: 1 warning, 0 errors -compiling Visual.c... -CarBody\Visual.c(119): warning: #550-D: variable "Visual_Type" was set but never used - char Visual_Type = '\0'; // 存储类型(r/b/u? -CarBody\Visual.c(122): warning: #550-D: variable "Visual_ReceiveFlag" was set but never used - uint8_t Visual_ReceiveFlag = 0; // 接收完成标志 -CarBody\Visual.c(128): warning: #550-D: variable "RxTimeoutTick" was set but never used - static uint32_t RxTimeoutTick = 0;// 超时计时器(毫秒? -CarBody\Visual.c(292): warning: #1-D: last line of file ends without a newline - */ -CarBody\Visual.c(20): warning: #177-D: variable "dataType" was declared but never referenced - static char dataType; // 存储类型字段?'r'/'b'/'u'? -CarBody\Visual.c: 5 warnings, 0 errors compiling main.c... -compiling stm32f4xx_it.c... linking... -Program Size: Code=32376 RO-data=1372 RW-data=604 ZI-data=3372 -".\Objects\Project.axf" - 0 Error(s), 8 Warning(s). +Program Size: Code=32184 RO-data=1372 RW-data=616 ZI-data=3408 +".\Objects\Project.axf" - 0 Error(s), 0 Warning(s).

Software Packages used:

@@ -134,7 +44,7 @@ Package Vendor: Keil

Collection of Component include folders:

Collection of Component Files used:

-Build Time Elapsed: 00:00:05 +Build Time Elapsed: 00:00:02 diff --git a/云台/云台/Objects/Project.htm b/云台/云台/Objects/Project.htm index a7d8735..2dfcb65 100644 --- a/云台/云台/Objects/Project.htm +++ b/云台/云台/Objects/Project.htm @@ -3,7 +3,7 @@ Static Call Graph - [.\Objects\Project.axf]

Static Call Graph for image .\Objects\Project.axf


-

#<CALLGRAPH># ARM Linker, 5060960: Last Updated: Tue Mar 10 14:28:10 2026 +

#<CALLGRAPH># ARM Linker, 5060960: Last Updated: Sat Mar 28 17:36:53 2026

Maximum Stack Usage = 280 bytes + Unknown(Cycles, Untraceable Function Pointers)

Call chain for Maximum Stack Depth:

@@ -121,7 +121,7 @@ Global Symbols

__main (Thumb, 0 bytes, Stack size unknown bytes, entry.o(.ARM.Collect$$$$00000000))
[Address Reference Count : 1]

-

_main_stk (Thumb, 0 bytes, Stack size unknown bytes, entry2.o(.ARM.Collect$$$$00000001)) +

_main_stk (Thumb, 0 bytes, Stack size unknown bytes, entry2.o(.ARM.Collect$$$$00000001))

_main_scatterload (Thumb, 0 bytes, Stack size unknown bytes, entry5.o(.ARM.Collect$$$$00000004))

[Calls]