同步最新代码,pitch、yaw正常开启,等待单发限位代码

This commit is contained in:
2026-03-23 19:28:52 +08:00
parent 1bc3278657
commit d56e5c6d8c
162 changed files with 12753 additions and 5456 deletions

View File

@@ -58,7 +58,7 @@ void Mecanum_Init(void)
//Raw Code//
//PID_PositionSetParameter(&Mecanum_TrackPID,0.007,0,0.8);
//Testing Code//
PID_PositionSetParameter(&Mecanum_TrackPID,0.01,0,01);//随便写的PID值勉强可以用
PID_PositionSetParameter(&Mecanum_TrackPID,0.01,0,1);//随便写的PID值勉强可以用
PID_PositionSetEkRange(&Mecanum_TrackPID,-1,1);
PID_PositionSetOUTRange(&Mecanum_TrackPID,-4,4);
@@ -184,16 +184,16 @@ void Mecanum_PowerMoveControl(void)
vx=vx_*cosf(Mecanum_YawTheta)-vy_*sinf(Mecanum_YawTheta);
vy=vx_*sinf(Mecanum_YawTheta)+vy_*cosf(Mecanum_YawTheta);//根据底盘云台相对角度修正xy轴速度
/*==========小陀螺处理==========*/
/*==========小陀螺处理==========*/
if(Yaw_GM6020PositionValue<4096)//正向小陀螺为逆时针
{
if((Remote_RxData.Remote_RS==2 || Remote_RxData.Remote_KeyPush_Ctrl==1) || (Mecanum_GyroScopeFlag==1 && Mecanum_GyroScopeCloseFlag==1 && GM6020_MotorStatus[0].Position<Yaw_GM6020PositionValue+500))//小陀螺模式
{
w=Mecanum_GyroScopeAngularVelocity;
w=-Mecanum_GyroScopeAngularVelocity;
Mecanum_GyroScopeFlag=1;//处于小陀螺状态
Mecanum_GyroScopeCloseFlag=1;//小陀螺处于待关闭状态
}
else if(Mecanum_GyroScopeFlag==1 && ((GM6020_MotorStatus[0].Angle>Yaw_GM6020PositionValue+100 || GM6020_MotorStatus[0].Angle<Yaw_GM6020PositionValue-100) || (GM6020_MotorStatus[0].Speed>2||GM6020_MotorStatus[0].Speed<-2)))//小陀螺关闭状态
else if(Mecanum_GyroScopeFlag==1 && ((GM6020_MotorStatus[0].Angle>Yaw_GM6020PositionValue+200 || GM6020_MotorStatus[0].Angle<Yaw_GM6020PositionValue-200) || (GM6020_MotorStatus[0].Speed>3||GM6020_MotorStatus[0].Speed<-3)))//小陀螺关闭状态
{
PID_PositionSetOUTRange(&Mecanum_TrackPID,-2,2);
PID_PositionCalc(&Mecanum_TrackPID,GM6020_MotorStatus[0].Position);//底盘跟云台
@@ -201,7 +201,7 @@ void Mecanum_PowerMoveControl(void)
Mecanum_GyroScopeCloseFlag=0;//小陀螺未处于待关闭状态
}
else if(Remote_RxData.Remote_RS==1)//反向小陀螺模式(仅检录使用)
w=-Mecanum_GyroScopeAngularVelocity;
w=Mecanum_GyroScopeAngularVelocity;
else
{
PID_PositionSetOUTRange(&Mecanum_TrackPID,-5,5);
@@ -214,11 +214,11 @@ void Mecanum_PowerMoveControl(void)
{
if((Remote_RxData.Remote_RS==2 || Remote_RxData.Remote_KeyPush_Ctrl==1) || (Mecanum_GyroScopeFlag==1 && Mecanum_GyroScopeCloseFlag==1 && GM6020_MotorStatus[0].Position>Yaw_GM6020PositionValue-500))//小陀螺模式
{
w=-Mecanum_GyroScopeAngularVelocity;
w=Mecanum_GyroScopeAngularVelocity;
Mecanum_GyroScopeFlag=1;//处于小陀螺状态
Mecanum_GyroScopeCloseFlag=1;//小陀螺处于待关闭状态
}
else if(Mecanum_GyroScopeFlag==1 && ((GM6020_MotorStatus[0].Angle>Yaw_GM6020PositionValue+5 || GM6020_MotorStatus[0].Angle<Yaw_GM6020PositionValue-5) || (GM6020_MotorStatus[0].Speed>1||GM6020_MotorStatus[0].Speed<-1)))//小陀螺关闭状态
else if(Mecanum_GyroScopeFlag==1 && ((GM6020_MotorStatus[0].Angle>Yaw_GM6020PositionValue+200 || GM6020_MotorStatus[0].Angle<Yaw_GM6020PositionValue-200) || (GM6020_MotorStatus[0].Speed>3||GM6020_MotorStatus[0].Speed<-3)))//小陀螺关闭状态
{
PID_PositionSetOUTRange(&Mecanum_TrackPID,-2,2);
PID_PositionCalc(&Mecanum_TrackPID,GM6020_MotorStatus[0].Position);//底盘跟云台
@@ -226,7 +226,7 @@ void Mecanum_PowerMoveControl(void)
Mecanum_GyroScopeCloseFlag=0;//小陀螺未处于待关闭状态
}
else if(Remote_RxData.Remote_RS==1)//反向小陀螺模式(仅检录使用)
w=Mecanum_GyroScopeAngularVelocity;
w=-Mecanum_GyroScopeAngularVelocity;
else
{
PID_PositionSetOUTRange(&Mecanum_TrackPID,-5,5);
@@ -235,7 +235,6 @@ void Mecanum_PowerMoveControl(void)
w=-Mecanum_TrackPID.OUT;
}
}
/*==========功率上限处理==========*/
/*由缓冲能量得到功率控制功率上限*/
float Mecanum_PowerRef=1.0f/(60.0f-Mecanum_PowerControl_UseBuffer)*RefereeSystem_Buffer;//功率增益

View File

@@ -842,16 +842,16 @@ ARM Macro Assembler Page 13
00000000
Command Line: --debug --xref --diag_suppress=9931 --cpu=Cortex-M4.fp.sp --apcs=
interwork --depend=.\objects\startup_stm32f40_41xxx.d -o.\objects\startup_stm32
f40_41xxx.o -IC:\Users\LSMushui\AppData\Local\Arm\Packs\Keil\STM32F4xx_DFP\3.1.
f40_41xxx.o -ID:\useless\ARM\PACK\Keil\STM32F4xx_DFP\3.0.0\Drivers\CMSIS\Device
ARM Macro Assembler Page 14
1\Drivers\CMSIS\Device\ST\STM32F4xx\Include --predefine="__MICROLIB SETA 1" --p
redefine="__UVISION_VERSION SETA 543" --predefine="STM32F407xx SETA 1" --list=.
\listings\startup_stm32f40_41xxx.lst Start\startup_stm32f40_41xxx.s
\ST\STM32F4xx\Include --predefine="__MICROLIB SETA 1" --predefine="__UVISION_VE
RSION SETA 539" --predefine="STM32F407xx SETA 1" --list=.\listings\startup_stm3
2f40_41xxx.lst Start\startup_stm32f40_41xxx.s

View File

@@ -0,0 +1,2 @@
[EXTDLL]
Count=0

Binary file not shown.

View File

@@ -3,112 +3,43 @@
<pre>
<h1><EFBFBD>Vision Build Log</h1>
<h2>Tool Versions:</h2>
IDE-Version: <20><>Vision V5.43.1.0
Copyright (C) 2025 ARM Ltd and ARM Germany GmbH. All rights reserved.
License Information: LS Mushui, 1, LIC=NQQMA-1N3GT-30GNC-71PK8-06QJT-WGQ3X
IDE-Version: <20><>Vision V5.39.0.0
Copyright (C) 2023 ARM Ltd and ARM Germany GmbH. All rights reserved.
License Information: sun JXF, sun, LIC=HN0AE-5SW5I-PCIJ8-3MDKX-KLD28-41CF7
Tool Versions:
Toolchain: MDK-ARM Plus Version: 5.43.0.0
Toolchain Path: C:\Users\LSMushui\AppData\Local\Keil_v5\ARM\ARMCC\Bin
Toolchain: MDK-ARM Plus Version: 5.39.0.0
Toolchain Path: D:\useless\ARM\ARM_Compiler_5.06u7\Bin
C Compiler: Armcc.exe V5.06 update 7 (build 960)
Assembler: Armasm.exe V5.06 update 7 (build 960)
Linker/Locator: ArmLink.exe V5.06 update 7 (build 960)
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
CPU DLL: SARMCM3.DLL V5.39.0.0
Dialog DLL: DCM.DLL V1.17.5.0
Target DLL: CMSIS_AGDI.dll V1.33.24.0
Dialog DLL: TCM.DLL V1.56.6.0
Target DLL: CMSIS_AGDI.dll V1.33.16.0
Dialog DLL: TCM.DLL V1.56.4.0
<h2>Project:</h2>
C:\Users\LSMushui\Desktop\RM\Hero-C-Board-Legacy\<5C><><EFBFBD><EFBFBD>\<5C><><EFBFBD><EFBFBD>\Project.uvprojx
Project File Date: 11/02/2025
D:\robomaster\Hero-C-Board-Legacy-main\hero-c-board-legacy\<5C><><EFBFBD><EFBFBD>\<5C><><EFBFBD><EFBFBD>\Project.uvprojx
Project File Date: 03/19/2026
<h2>Output:</h2>
*** 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 stm32f4xx_cec.c...
compiling stm32f4xx_dsi.c...
compiling stm32f4xx_can.c...
compiling stm32f4xx_adc.c...
compiling stm32f4xx_cryp.c...
compiling stm32f4xx_crc.c...
compiling stm32f4xx_cryp_tdes.c...
compiling stm32f4xx_dma2d.c...
compiling stm32f4xx_gpio.c...
compiling stm32f4xx_fmpi2c.c...
compiling stm32f4xx_cryp_des.c...
compiling stm32f4xx_dfsdm.c...
compiling stm32f4xx_dac.c...
compiling misc.c...
compiling stm32f4xx_flash_ramfunc.c...
compiling stm32f4xx_exti.c...
compiling stm32f4xx_dbgmcu.c...
compiling stm32f4xx_dcmi.c...
compiling stm32f4xx_fsmc.c...
compiling stm32f4xx_dma.c...
compiling stm32f4xx_flash.c...
compiling stm32f4xx_cryp_aes.c...
compiling stm32f4xx_hash.c...
compiling stm32f4xx_hash_sha1.c...
compiling stm32f4xx_hash_md5.c...
compiling stm32f4xx_i2c.c...
compiling stm32f4xx_iwdg.c...
compiling stm32f4xx_lptim.c...
compiling stm32f4xx_ltdc.c...
compiling stm32f4xx_qspi.c...
compiling stm32f4xx_pwr.c...
compiling stm32f4xx_rng.c...
compiling stm32f4xx_rcc.c...
compiling stm32f4xx_spdifrx.c...
compiling TIM.c...
compiling stm32f4xx_sai.c...
compiling stm32f4xx_wwdg.c...
compiling Delay.c...
compiling stm32f4xx_syscfg.c...
compiling stm32f4xx_sdio.c...
compiling stm32f4xx_spi.c...
compiling stm32f4xx_usart.c...
compiling stm32f4xx_rtc.c...
compiling UART.c...
compiling stm32f4xx_tim.c...
compiling CAN.c...
compiling Buzzer.c...
compiling LED.c...
compiling Remote.c...
compiling M3508.c...
compiling GM6020.c...
compiling Warming.c...
compiling CToC.c...
compiling LinkCheck.c...
compiling CloseLoopControl.c...
compiling PID.c...
compiling RefereeSystem.c...
compiling Mecanum.c...
compiling RefereeSystem_CRCTable.c...
compiling UI.c...
compiling Ultra_CAP.c...
compiling UI_Base.c...
compiling UI_Library.c...
compiling stm32f4xx_it.c...
compiling main.c...
linking...
Program Size: Code=18636 RO-data=1224 RW-data=408 ZI-data=2496
*** Using Compiler 'V5.06 update 7 (build 960)', folder: 'D:\useless\ARM\ARM_Compiler_5.06u7\Bin'
Build target 'Target 1'
".\Objects\Project.axf" - 0 Error(s), 0 Warning(s).
<h2>Software Packages used:</h2>
Package Vendor: Keil
https://www.keil.com/pack/Keil.STM32F4xx_DFP.3.1.1.pack
Keil::STM32F4xx_DFP@3.1.1
https://www.keil.com/pack/Keil.STM32F4xx_DFP.3.0.0.pack
Keil::STM32F4xx_DFP@3.0.0
STMicroelectronics STM32F4 Series Device Support
<h2>Collection of Component include folders:</h2>
<h2>Collection of Component Files used:</h2>
Build Time Elapsed: 00:00:04
Build Time Elapsed: 00:00:01
</pre>
</body>
</html>

View File

@@ -3,7 +3,7 @@
<title>Static Call Graph - [.\Objects\Project.axf]</title></head>
<body><HR>
<H1>Static Call Graph for image .\Objects\Project.axf</H1><HR>
<BR><P>#&#060CALLGRAPH&#062# ARM Linker, 5060960: Last Updated: Sun Jan 11 14:26:24 2026
<BR><P>#&#060CALLGRAPH&#062# ARM Linker, 5060960: Last Updated: Sat Mar 21 18:49:59 2026
<BR><P>
<H3>Maximum Stack Usage = 232 bytes + Unknown(Cycles, Untraceable Function Pointers)</H3><H3>
Call chain for Maximum Stack Depth:</H3>
@@ -934,7 +934,7 @@ Global Symbols
<BR>[Called By]<UL><LI><a href="#[96]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;CloseLoopControl_Init
</UL>
<P><STRONG><a name="[b0]"></a>Mecanum_PowerMoveControl</STRONG> (Thumb, 2004 bytes, Stack size 80 bytes, mecanum.o(i.Mecanum_PowerMoveControl))
<P><STRONG><a name="[b0]"></a>Mecanum_PowerMoveControl</STRONG> (Thumb, 2000 bytes, Stack size 80 bytes, mecanum.o(i.Mecanum_PowerMoveControl))
<BR><BR>[Stack]<UL><LI>Max Depth = 224<LI>Call Chain = Mecanum_PowerMoveControl &rArr; Mecanum_ControlSpeed &rArr; __aeabi_dadd &rArr; _double_epilogue &rArr; _double_round
</UL>
<BR>[Calls]<UL><LI><a href="#[b4]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Ultra_CAP_SetPower

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,16 @@
; *************************************************************
; *** Scatter-Loading Description File generated by uVision ***
; *************************************************************
LR_IROM1 0x08000000 0x00100000 { ; load region size_region
ER_IROM1 0x08000000 0x00100000 { ; load address = execution address
*.o (RESET, +First)
*(InRoot$$Sections)
.ANY (+RO)
.ANY (+XO)
}
RW_IRAM1 0x20000000 0x00020000 { ; RW data
.ANY (+RW +ZI)
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@@ -103,7 +103,7 @@
<bEvRecOn>1</bEvRecOn>
<bSchkAxf>0</bSchkAxf>
<bTchkAxf>0</bTchkAxf>
<nTsel>3</nTsel>
<nTsel>2</nTsel>
<sDll></sDll>
<sDllPa></sDllPa>
<sDlgDll></sDlgDll>
@@ -120,7 +120,7 @@
<SetRegEntry>
<Number>0</Number>
<Key>CMSIS_AGDI</Key>
<Name>-X"CMSIS-DAP_LU" -ULU_2022_8888 -O206 -S8 -C0 -P00 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO18 -TC10000000 -TP20 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO15 -FD20000000 -FC1000 -FN1 -FF0STM32F4xx_1024.FLM -FS08000000 -FL0100000 -FP0($$Device:STM32F407IGHx$CMSIS\Flash\STM32F4xx_1024.FLM)</Name>
<Name>-X"WCH CMSIS-DAP" -U453A9A84F57D -O206 -S8 -C0 -P00000000 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO65554 -TC10000000 -TT10000000 -TP20 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO15 -FD20000000 -FC1000 -FN1 -FF0STM32F4xx_1024.FLM -FS08000000 -FL0100000 -FP0($$Device:STM32F407IGHx$CMSIS\Flash\STM32F4xx_1024.FLM)</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
@@ -230,6 +230,11 @@
<WinNumber>1</WinNumber>
<ItemText>Odometer_dx</ItemText>
</Ww>
<Ww>
<count>15</count>
<WinNumber>1</WinNumber>
<ItemText>GM6020_MotorStatus[0],0x0A</ItemText>
</Ww>
</WatchWindow1>
<WatchWindow2>
<Ww>

View File

@@ -11,13 +11,13 @@
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pArmCC>5060960::V5.06 update 7 (build 960)::.\ARMCC</pArmCC>
<pCCUsed>5060960::V5.06 update 7 (build 960)::.\ARMCC</pCCUsed>
<pCCUsed>5060960::V5.06 update 7 (build 960)::.\ARM_Compiler_5.06u7</pCCUsed>
<uAC6>0</uAC6>
<TargetOption>
<TargetCommonOption>
<Device>STM32F407IGHx</Device>
<Vendor>STMicroelectronics</Vendor>
<PackID>Keil.STM32F4xx_DFP.3.1.1</PackID>
<PackID>Keil.STM32F4xx_DFP.3.0.0</PackID>
<PackURL>https://www.keil.com/pack/</PackURL>
<Cpu>IRAM(0x20000000,0x00020000) IRAM2(0x10000000,0x00010000) IROM(0x08000000,0x00100000) CPUTYPE("Cortex-M4") FPU2 CLOCK(12000000) ELITTLE</Cpu>
<FlashUtilSpec></FlashUtilSpec>