算基本完善了

This commit is contained in:
yunhai8432 2025-11-14 21:32:25 +08:00
parent 7ac32f55f9
commit e50944c11b
8 changed files with 1482 additions and 1485 deletions

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@ -31,9 +31,6 @@ Note: source file '..\User\bsp\can.c' - object file renamed from 'gimbal\can.o'
Note: source file '..\User\bsp\gpio.c' - object file renamed from 'gimbal\gpio.o' to 'gimbal\gpio_1.o'. Note: source file '..\User\bsp\gpio.c' - object file renamed from 'gimbal\gpio.o' to 'gimbal\gpio_1.o'.
Note: source file '..\User\bsp\i2c.c' - object file renamed from 'gimbal\i2c.o' to 'gimbal\i2c_1.o'. Note: source file '..\User\bsp\i2c.c' - object file renamed from 'gimbal\i2c.o' to 'gimbal\i2c_1.o'.
Note: source file '..\User\bsp\spi.c' - object file renamed from 'gimbal\spi.o' to 'gimbal\spi_1.o'. Note: source file '..\User\bsp\spi.c' - object file renamed from 'gimbal\spi.o' to 'gimbal\spi_1.o'.
compiling gimbal.c...
linking...
Program Size: Code=84864 RO-data=996 RW-data=404 ZI-data=34268
"gimbal\gimbal.axf" - 0 Error(s), 0 Warning(s). "gimbal\gimbal.axf" - 0 Error(s), 0 Warning(s).
<h2>Software Packages used:</h2> <h2>Software Packages used:</h2>

View File

@ -3,7 +3,7 @@
<title>Static Call Graph - [gimbal\gimbal.axf]</title></head> <title>Static Call Graph - [gimbal\gimbal.axf]</title></head>
<body><HR> <body><HR>
<H1>Static Call Graph for image gimbal\gimbal.axf</H1><HR> <H1>Static Call Graph for image gimbal\gimbal.axf</H1><HR>
<BR><P>#&#060CALLGRAPH&#062# ARM Linker, 6160001: Last Updated: Fri Nov 14 21:15:44 2025 <BR><P>#&#060CALLGRAPH&#062# ARM Linker, 6160001: Last Updated: Fri Nov 14 21:27:19 2025
<BR><P> <BR><P>
<H3>Maximum Stack Usage = 432 bytes + Unknown(Functions without stacksize, Cycles, Untraceable Function Pointers)</H3><H3> <H3>Maximum Stack Usage = 432 bytes + Unknown(Functions without stacksize, Cycles, Untraceable Function Pointers)</H3><H3>
Call chain for Maximum Stack Depth:</H3> Call chain for Maximum Stack Depth:</H3>
@ -1114,7 +1114,7 @@ Global Symbols
<LI><a href="#[198]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;MX_CAN1_Init <LI><a href="#[198]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;MX_CAN1_Init
</UL> </UL>
<P><STRONG><a name="[eb]"></a>Gimbal_Control</STRONG> (Thumb, 1348 bytes, Stack size 88 bytes, gimbal.o(.text.Gimbal_Control)) <P><STRONG><a name="[eb]"></a>Gimbal_Control</STRONG> (Thumb, 1340 bytes, Stack size 88 bytes, gimbal.o(.text.Gimbal_Control))
<BR><BR>[Stack]<UL><LI>Max Depth = 208<LI>Call Chain = Gimbal_Control &rArr; PID_Calc &rArr; LowPassFilter2p_Apply &rArr; __ARM_isinf <BR><BR>[Stack]<UL><LI>Max Depth = 208<LI>Call Chain = Gimbal_Control &rArr; PID_Calc &rArr; LowPassFilter2p_Apply &rArr; __ARM_isinf
</UL> </UL>
<BR>[Calls]<UL><LI><a href="#[f1]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Clip <BR>[Calls]<UL><LI><a href="#[f1]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Clip

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -2534,7 +2534,7 @@ I (..\User\device\motor_rm.h)(0x68F22F87)
I (..\User\module\config.h)(0x68DD3463) I (..\User\module\config.h)(0x68DD3463)
I (..\User\device\motor_lz.h)(0x68F22F87) I (..\User\device\motor_lz.h)(0x68F22F87)
I (..\User\device\motor_lk.h)(0x68F22F87) I (..\User\device\motor_lk.h)(0x68F22F87)
F (..\User\module\gimbal.c)(0x69172B7F)(-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -c -fno-rtti -funsigned-char -fshort-enums -fshort-wchar -gdwarf-3 -O0 -ffunction-sections -w -I ../Core/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../User/bsp -I ../User/component -I ../User/device -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../User/task -I ../User -I ../User/module -I./RTE/_gimbal -ID:/Keil_v5/Arm/Packs/ARM/CMSIS/5.7.0/CMSIS/Core/Include -ID:/Keil_v5/Arm/Packs/Keil/STM32F4xx_DFP/2.17.1/Drivers/CMSIS/Device/ST/STM32F4xx/Include -D__UVISION_VERSION="534" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx -o gimbal/gimbal.o -MD) F (..\User\module\gimbal.c)(0x69172E35)(-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -c -fno-rtti -funsigned-char -fshort-enums -fshort-wchar -gdwarf-3 -O0 -ffunction-sections -w -I ../Core/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../User/bsp -I ../User/component -I ../User/device -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../User/task -I ../User -I ../User/module -I./RTE/_gimbal -ID:/Keil_v5/Arm/Packs/ARM/CMSIS/5.7.0/CMSIS/Core/Include -ID:/Keil_v5/Arm/Packs/Keil/STM32F4xx_DFP/2.17.1/Drivers/CMSIS/Device/ST/STM32F4xx/Include -D__UVISION_VERSION="534" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx -o gimbal/gimbal.o -MD)
I (..\User\module\gimbal.h)(0x6917284C) I (..\User\module\gimbal.h)(0x6917284C)
I (..\User\component\ahrs.h)(0x68F3410E) I (..\User\component\ahrs.h)(0x68F3410E)
I (..\User\component\user_math.h)(0x68F22FA9) I (..\User\component\user_math.h)(0x68F22FA9)

View File

@ -297,8 +297,8 @@ int8_t Gimbal_Control(Gimbal_t *g, Gimbal_CMD_t *g_cmd) {
break; break;
case GIMBAL_MODE_RELATIVE: case GIMBAL_MODE_RELATIVE:
/*计算零点*/ /*计算零点*/
g->zero.travel.yaw=motor_imu_offset(&g->param->zero.yaw_encoder,&g->feedback.imu.eulr.yaw); g->zero.travel.yaw=motor_imu_offset(&g->feedback.motor.yaw.rotor_abs_angle,&g->feedback.imu.eulr.yaw);
g->zero.travel.yaw=motor_imu_offset(&g->param->zero.pit_encoder,&g->feedback.imu.eulr.pit); g->zero.travel.yaw=motor_imu_offset(&g->feedback.motor.pit.rotor_abs_angle,&g->feedback.imu.eulr.pit);
g->zero.yaw = g->param->zero.yaw_encoder - g->zero.travel.yaw; g->zero.yaw = g->param->zero.yaw_encoder - g->zero.travel.yaw;
g->zero.pit = g->param->zero.pit_encoder - g->zero.travel.pit; g->zero.pit = g->param->zero.pit_encoder - g->zero.travel.pit;