添加yaw周软件限位

This commit is contained in:
RB 2025-03-10 10:30:30 +08:00
parent ac5a01df30
commit 774fd7e3fe
9 changed files with 15720 additions and 15817 deletions

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@ -37,126 +37,9 @@ 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\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'.
compiling gpio.c...
compiling main.c...
compiling freertos.c...
compiling adc.c...
compiling can.c...
compiling crc.c...
compiling dma.c...
compiling i2c.c...
compiling rng.c...
compiling spi.c...
compiling tim.c...
compiling usart.c...
compiling stm32f4xx_it.c...
compiling stm32f4xx_hal_msp.c...
compiling usb_device.c...
compiling usbd_desc.c...
compiling usbd_cdc_if.c...
compiling usbd_conf.c...
compiling system_stm32f4xx.c...
compiling stm32f4xx_hal_pcd.c...
compiling stm32f4xx_hal_pcd_ex.c...
compiling stm32f4xx_ll_usb.c...
compiling stm32f4xx_hal_rcc.c...
compiling stm32f4xx_hal_rcc_ex.c...
compiling stm32f4xx_hal_flash.c...
compiling stm32f4xx_hal_flash_ex.c...
compiling stm32f4xx_hal_flash_ramfunc.c...
compiling stm32f4xx_hal_gpio.c...
compiling stm32f4xx_hal_dma_ex.c...
compiling stm32f4xx_hal_dma.c...
compiling stm32f4xx_hal_pwr.c...
compiling stm32f4xx_hal_pwr_ex.c...
compiling stm32f4xx_hal_cortex.c...
compiling stm32f4xx_hal.c...
compiling stm32f4xx_hal_exti.c...
compiling stm32f4xx_hal_adc.c...
compiling stm32f4xx_hal_adc_ex.c...
compiling stm32f4xx_hal_crc.c...
compiling stm32f4xx_hal_can.c...
compiling stm32f4xx_hal_i2c_ex.c...
compiling stm32f4xx_hal_rng.c...
compiling stm32f4xx_hal_i2c.c...
compiling stm32f4xx_hal_spi.c...
compiling stm32f4xx_hal_tim_ex.c...
compiling stm32f4xx_hal_uart.c...
compiling croutine.c...
compiling stm32f4xx_hal_tim.c...
compiling list.c...
compiling event_groups.c...
compiling queue.c...
compiling stream_buffer.c...
compiling tasks.c...
compiling timers.c...
compiling heap_4.c...
compiling port.c...
compiling cmsis_os2.c...
compiling usbd_core.c...
compiling usbd_ctlreq.c...
compiling usbd_ioreq.c...
compiling adc.c...
compiling usbd_cdc.c...
compiling buzzer.c...
compiling crc32.c...
compiling can.c...
compiling delay.c...
compiling flash.c...
compiling fric.c...
compiling gpio.c...
compiling i2c.c...
compiling laser.c...
compiling led.c...
compiling mm.c...
compiling pwm.c...
compiling rand.c...
compiling servo.c...
compiling spi.c...
compiling uart.c...
compiling usb.c...
compiling ahrs.c...
compiling ballistics.c...
compiling capacity.c...
compiling crc8.c...
compiling crc16.c...
compiling cmd.c...
compiling error_detect.c...
compiling limiter.c...
compiling filter.c...
compiling mixer.c...
compiling pid.c...
compiling FreeRTOS_CLI.c...
compiling user_math.c...
compiling ui.c...
compiling bmi088.c...
compiling can.c...
compiling dr16.c...
compiling ist8310.c...
compiling referee.c...
compiling cap.c...
compiling ai.c...
compiling chassis.c...
compiling config.c...
compiling gimbal.c...
compiling shoot.c...
compiling ai.c...
compiling atti_esti.c...
compiling cap.c...
compiling can.c...
compiling cli.c...
compiling command.c...
compiling ctrl_chassis.c...
compiling ctrl_gimbal.c...
compiling info.c...
compiling ctrl_shoot.c...
compiling init.c...
compiling rc.c...
compiling monitor.c...
compiling referee.c...
compiling user_task.c...
linking...
Program Size: Code=148744 RO-data=7272 RW-data=760 ZI-data=43824
Program Size: Code=148920 RO-data=7272 RW-data=760 ZI-data=43824
FromELF: creating hex file...
"DevC\DevC.axf" - 0 Error(s), 0 Warning(s).
@ -172,7 +55,7 @@ Package Vendor: Keil
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>
Build Time Elapsed: 00:00:23
Build Time Elapsed: 00:00:01
</pre>
</body>
</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>
<body><HR>
<H1>Static Call Graph for image DevC\DevC.axf</H1><HR>
<BR><P>#&#060CALLGRAPH&#062# ARM Linker, 6160001: Last Updated: Sun Mar 9 17:59:51 2025
<BR><P>#&#060CALLGRAPH&#062# ARM Linker, 6160001: Last Updated: Mon Mar 10 10:28:13 2025
<BR><P>
<H3>Maximum Stack Usage = 632 bytes + Unknown(Cycles, Untraceable Function Pointers)</H3><H3>
Call chain for Maximum Stack Depth:</H3>
@ -1728,7 +1728,7 @@ Global Symbols
<BR>[Called By]<UL><LI><a href="#[8e]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Task_CLI
</UL>
<P><STRONG><a name="[17f]"></a>Gimbal_Control</STRONG> (Thumb, 724 bytes, Stack size 64 bytes, gimbal.o(.text.Gimbal_Control))
<P><STRONG><a name="[17f]"></a>Gimbal_Control</STRONG> (Thumb, 892 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
</UL>
<BR>[Calls]<UL><LI><a href="#[180]">&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.

View File

@ -152,6 +152,14 @@ int8_t Gimbal_Control(Gimbal_t *g, CMD_GimbalCmd_t *g_cmd, uint32_t now) {
Clip(&(g_cmd->delta_eulr.pit), delta_min, delta_max);
g->setpoint.eulr.pit += g_cmd->delta_eulr.pit;
/* 限制yaw转动范围待优化 */
if (g->setpoint.eulr.yaw > 5.9f && g->setpoint.eulr.yaw < 6.0f) {
g->setpoint.eulr.yaw = 5.9f;
} else if (g->setpoint.eulr.yaw > 1.4f && g->setpoint.eulr.yaw < 1.5f) {
g->setpoint.eulr.yaw = 1.5f;
}
/* 重置输入指令,防止重复处理 */
AHRS_ResetEulr(&(g_cmd->delta_eulr));