改完了

This commit is contained in:
RB 2025-03-19 17:19:43 +08:00
parent 3a509aaf87
commit d79bb5ea0b
13 changed files with 10709 additions and 10695 deletions

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@ -22,7 +22,7 @@ Dialog DLL: TCM.DLL V1.48.0.0
<h2>Project:</h2> <h2>Project:</h2>
C:\Users\lvzucheng\Documents\RMUL2025\MDK-ARM\DevC.uvprojx C:\Users\lvzucheng\Documents\RMUL2025\MDK-ARM\DevC.uvprojx
Project File Date: 03/17/2025 Project File Date: 03/19/2025
<h2>Output:</h2> <h2>Output:</h2>
*** Using Compiler 'V6.16', folder: 'C:\Keil_v5\ARM\ARMCLANG\Bin' *** Using Compiler 'V6.16', folder: 'C:\Keil_v5\ARM\ARMCLANG\Bin'
@ -37,9 +37,13 @@ Note: source file '..\User\task\ai.c' - object file renamed from 'DevC\ai.o' to
Note: source file '..\User\task\can.c' - object file renamed from 'DevC\can.o' to 'DevC\can_3.o'. Note: source file '..\User\task\can.c' - object file renamed from 'DevC\can.o' to 'DevC\can_3.o'.
Note: source file '..\User\task\cap.c' - object file renamed from 'DevC\cap.o' to 'DevC\cap_1.o'. Note: source file '..\User\task\cap.c' - object file renamed from 'DevC\cap.o' to 'DevC\cap_1.o'.
Note: source file '..\User\task\referee.c' - object file renamed from 'DevC\referee.o' to 'DevC\referee_1.o'. Note: source file '..\User\task\referee.c' - object file renamed from 'DevC\referee.o' to 'DevC\referee_1.o'.
compiling user_math.c...
compiling main.c...
compiling ai.c... compiling ai.c...
compiling config.c...
compiling shoot.c...
linking... linking...
Program Size: Code=149584 RO-data=6928 RW-data=1104 ZI-data=43832 Program Size: Code=149600 RO-data=6928 RW-data=1104 ZI-data=43832
FromELF: creating hex file... FromELF: creating hex file...
"DevC\DevC.axf" - 0 Error(s), 0 Warning(s). "DevC\DevC.axf" - 0 Error(s), 0 Warning(s).
@ -55,7 +59,7 @@ Package Vendor: Keil
C:\Users\lvzucheng\AppData\Local\Arm\Packs\Keil\STM32F4xx_DFP\2.15.0\Drivers\CMSIS\Device\ST\STM32F4xx\Include C:\Users\lvzucheng\AppData\Local\Arm\Packs\Keil\STM32F4xx_DFP\2.15.0\Drivers\CMSIS\Device\ST\STM32F4xx\Include
<h2>Collection of Component Files used:</h2> <h2>Collection of Component Files used:</h2>
Build Time Elapsed: 00:00:02 Build Time Elapsed: 00:00:03
</pre> </pre>
</body> </body>
</html> </html>

File diff suppressed because it is too large Load Diff

View File

@ -3,7 +3,7 @@
<title>Static Call Graph - [DevC\DevC.axf]</title></head> <title>Static Call Graph - [DevC\DevC.axf]</title></head>
<body><HR> <body><HR>
<H1>Static Call Graph for image DevC\DevC.axf</H1><HR> <H1>Static Call Graph for image DevC\DevC.axf</H1><HR>
<BR><P>#&#060CALLGRAPH&#062# ARM Linker, 6160001: Last Updated: Mon Mar 17 13:03:58 2025 <BR><P>#&#060CALLGRAPH&#062# ARM Linker, 6160001: Last Updated: Wed Mar 19 17:14:45 2025
<BR><P> <BR><P>
<H3>Maximum Stack Usage = 632 bytes + Unknown(Cycles, Untraceable Function Pointers)</H3><H3> <H3>Maximum Stack Usage = 632 bytes + Unknown(Cycles, Untraceable Function Pointers)</H3><H3>
Call chain for Maximum Stack Depth:</H3> Call chain for Maximum Stack Depth:</H3>
@ -1752,7 +1752,7 @@ Global Symbols
<BR>[Called By]<UL><LI><a href="#[8e]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Task_CLI <BR>[Called By]<UL><LI><a href="#[8e]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Task_CLI
</UL> </UL>
<P><STRONG><a name="[183]"></a>Gimbal_Control</STRONG> (Thumb, 844 bytes, Stack size 64 bytes, gimbal.o(.text.Gimbal_Control)) <P><STRONG><a name="[183]"></a>Gimbal_Control</STRONG> (Thumb, 856 bytes, Stack size 64 bytes, gimbal.o(.text.Gimbal_Control))
<BR><BR>[Stack]<UL><LI>Max Depth = 184<LI>Call Chain = Gimbal_Control &rArr; Gimbal_SetMode &rArr; PID_Reset &rArr; LowPassFilter2p_Reset &rArr; LowPassFilter2p_Apply &rArr; __ARM_isinf <BR><BR>[Stack]<UL><LI>Max Depth = 184<LI>Call Chain = Gimbal_Control &rArr; Gimbal_SetMode &rArr; PID_Reset &rArr; LowPassFilter2p_Reset &rArr; LowPassFilter2p_Apply &rArr; __ARM_isinf
</UL> </UL>
<BR>[Calls]<UL><LI><a href="#[184]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Gimbal_SetMode <BR>[Calls]<UL><LI><a href="#[184]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Gimbal_SetMode

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -107,7 +107,7 @@ inline float CalculateRpm(float bullet_speed, float fric_radius, bool is17mm) {
if (is17mm) { if (is17mm) {
if (bullet_speed == 15.0f) return 4670.f; if (bullet_speed == 15.0f) return 4670.f;
if (bullet_speed == 18.0f) return 5200.f; if (bullet_speed == 18.0f) return 5200.f;
if (bullet_speed == 30.0f) return 6600.f; if (bullet_speed == 25.0f) return 6600.f;
if (bullet_speed == 30.0f) return 7350.f; if (bullet_speed == 30.0f) return 7350.f;
} else { } else {
if (bullet_speed == 10.0f) return 4450.f; if (bullet_speed == 10.0f) return 4450.f;

View File

@ -52,7 +52,7 @@ int8_t AI_Init(AI_t *ai) {
Ai_IdleLineCallback); Ai_IdleLineCallback);
ai->search_velocity.yaw = 0.0025f; ai->search_velocity.yaw = 0.0025f;
ai->search_velocity.pit = 0.002f; ai->search_velocity.pit = 0.003f;
inited = true; inited = true;
return 0; return 0;
} }
@ -99,13 +99,13 @@ void AI_PackCmd(AI_t *ai, CMD_Host_t *cmd_host) {
} }
void AI_SearchArmor(AI_t *ai, CMD_Host_t *cmd_host , AHRS_Eulr_t *gimbal_ai){ void AI_SearchArmor(AI_t *ai, CMD_Host_t *cmd_host , AHRS_Eulr_t *gimbal_ai){
if (gimbal_ai->pit > 2.4){ if (gimbal_ai->pit > 2.45){
ai->search_velocity.pit = fAbs(ai->search_velocity.pit); ai->search_velocity.pit = fAbs(ai->search_velocity.pit);
} else if (gimbal_ai->pit < 2.2) { } else if (gimbal_ai->pit < 2.2) {
ai->search_velocity.pit = -fAbs(ai->search_velocity.pit); ai->search_velocity.pit = -fAbs(ai->search_velocity.pit);
} }
if (gimbal_ai->yaw > 1.5 && gimbal_ai->yaw < 2.1) { if (gimbal_ai->yaw > 1.5 && gimbal_ai->yaw < 1.9) {
ai->search_velocity.yaw = -fAbs(ai->search_velocity.yaw); ai->search_velocity.yaw = -fAbs(ai->search_velocity.yaw);
} else if (gimbal_ai->yaw > 5.4 && gimbal_ai->yaw < 6.0) { } else if (gimbal_ai->yaw > 5.4 && gimbal_ai->yaw < 6.0) {
ai->search_velocity.yaw = fAbs(ai->search_velocity.yaw); ai->search_velocity.yaw = fAbs(ai->search_velocity.yaw);

View File

@ -153,10 +153,10 @@ int8_t Gimbal_Control(Gimbal_t *g, CMD_GimbalCmd_t *g_cmd, uint32_t now) {
g->setpoint.eulr.pit += g_cmd->delta_eulr.pit; g->setpoint.eulr.pit += g_cmd->delta_eulr.pit;
/* 限制yaw转动范围待优化 */ /* 限制yaw转动范围待优化 */
if (g->setpoint.eulr.yaw > 5.9f && g->setpoint.eulr.yaw < 6.0f) { if (g->setpoint.eulr.yaw > 5.9f && g->setpoint.eulr.yaw < 6.01f) {
g->setpoint.eulr.yaw = 5.9f; g->setpoint.eulr.yaw = 5.9f;
} else if (g->setpoint.eulr.yaw > 1.4f && g->setpoint.eulr.yaw < 1.5f) { } else if (g->setpoint.eulr.yaw > 1.4f && g->setpoint.eulr.yaw < 1.71f) {
g->setpoint.eulr.yaw = 1.5f; g->setpoint.eulr.yaw = 1.71f;
} }