From 2b3828905bd558955f6a3071727118407306ecb0 Mon Sep 17 00:00:00 2001 From: xiaoshuo <1621320660@qq.com> Date: Thu, 28 Aug 2025 19:26:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8B=86=E5=88=86=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MDK-ARM/.vscode/c_cpp_properties.json | 40 +++++------ MDK-ARM/.vscode/keil-assistant.log | 8 +++ MDK-ARM/.vscode/uv4.log | 75 ++++++++++++++++++-- MDK-ARM/.vscode/uv4.log.lock | 2 +- MDK-ARM/R1.uvoptx | 99 ++++----------------------- MDK-ARM/R1.uvprojx | 2 +- User/bsp/TopDefine.h | 2 +- User/module/shoot.cpp | 13 ++-- 8 files changed, 125 insertions(+), 116 deletions(-) diff --git a/MDK-ARM/.vscode/c_cpp_properties.json b/MDK-ARM/.vscode/c_cpp_properties.json index 05c8383..cf39a49 100644 --- a/MDK-ARM/.vscode/c_cpp_properties.json +++ b/MDK-ARM/.vscode/c_cpp_properties.json @@ -3,26 +3,26 @@ { "name": "R1", "includePath": [ - "d:\\Desktop\\r1\\R1_up\\Core\\Inc", - "d:\\Desktop\\r1\\R1_up\\Drivers\\STM32F4xx_HAL_Driver\\Inc", - "d:\\Desktop\\r1\\R1_up\\Drivers\\STM32F4xx_HAL_Driver\\Inc\\Legacy", - "d:\\Desktop\\r1\\R1_up\\Middlewares\\Third_Party\\FreeRTOS\\Source\\include", - "d:\\Desktop\\r1\\R1_up\\Middlewares\\Third_Party\\FreeRTOS\\Source\\CMSIS_RTOS_V2", - "d:\\Desktop\\r1\\R1_up\\Middlewares\\Third_Party\\FreeRTOS\\Source\\portable\\RVDS\\ARM_CM4F", - "d:\\Desktop\\r1\\R1_up\\Drivers\\CMSIS\\Device\\ST\\STM32F4xx\\Include", - "d:\\Desktop\\r1\\R1_up\\Drivers\\CMSIS\\Include", - "d:\\Desktop\\r1\\R1_up\\User\\bsp", - "d:\\Desktop\\r1\\R1_up\\User\\module", - "d:\\Desktop\\r1\\R1_up\\User\\task", - "d:\\Desktop\\r1\\R1_up\\User\\lib", - "d:\\Desktop\\r1\\R1_up\\User\\device", - "D:\\keil\\ARM\\ARMCC\\include", - "D:\\keil\\ARM\\ARMCC\\include\\rw", - "d:\\Desktop\\r1\\R1_up\\MDK-ARM", - "d:\\Desktop\\r1\\R1_up\\Core\\Src", - "d:\\Desktop\\r1\\R1_up\\Drivers\\STM32F4xx_HAL_Driver\\Src", - "d:\\Desktop\\r1\\R1_up\\Middlewares\\Third_Party\\FreeRTOS\\Source", - "d:\\Desktop\\r1\\R1_up\\Middlewares\\Third_Party\\FreeRTOS\\Source\\portable\\MemMang" + "d:\\Desktop\\R1_up\\Core\\Inc", + "d:\\Desktop\\R1_up\\Drivers\\STM32F4xx_HAL_Driver\\Inc", + "d:\\Desktop\\R1_up\\Drivers\\STM32F4xx_HAL_Driver\\Inc\\Legacy", + "d:\\Desktop\\R1_up\\Middlewares\\Third_Party\\FreeRTOS\\Source\\include", + "d:\\Desktop\\R1_up\\Middlewares\\Third_Party\\FreeRTOS\\Source\\CMSIS_RTOS_V2", + "d:\\Desktop\\R1_up\\Middlewares\\Third_Party\\FreeRTOS\\Source\\portable\\RVDS\\ARM_CM4F", + "d:\\Desktop\\R1_up\\Drivers\\CMSIS\\Device\\ST\\STM32F4xx\\Include", + "d:\\Desktop\\R1_up\\Drivers\\CMSIS\\Include", + "d:\\Desktop\\R1_up\\User\\bsp", + "d:\\Desktop\\R1_up\\User\\module", + "d:\\Desktop\\R1_up\\User\\task", + "d:\\Desktop\\R1_up\\User\\lib", + "d:\\Desktop\\R1_up\\User\\device", + "D:\\Develop\\keil\\ARM\\ARMCC\\include", + "D:\\Develop\\keil\\ARM\\ARMCC\\include\\rw", + "d:\\Desktop\\R1_up\\MDK-ARM", + "d:\\Desktop\\R1_up\\Core\\Src", + "d:\\Desktop\\R1_up\\Drivers\\STM32F4xx_HAL_Driver\\Src", + "d:\\Desktop\\R1_up\\Middlewares\\Third_Party\\FreeRTOS\\Source", + "d:\\Desktop\\R1_up\\Middlewares\\Third_Party\\FreeRTOS\\Source\\portable\\MemMang" ], "defines": [ "USE_HAL_DRIVER", diff --git a/MDK-ARM/.vscode/keil-assistant.log b/MDK-ARM/.vscode/keil-assistant.log index 7f2107f..128b61b 100644 --- a/MDK-ARM/.vscode/keil-assistant.log +++ b/MDK-ARM/.vscode/keil-assistant.log @@ -164,3 +164,11 @@ [info] Log at : 2025/7/16|22:26:06|GMT+0800 +[info] Log at : 2025/8/26|11:04:50|GMT+0800 + +[info] Log at : 2025/8/27|09:22:50|GMT+0800 + +[info] Log at : 2025/8/27|21:26:07|GMT+0800 + +[info] Log at : 2025/8/28|09:52:37|GMT+0800 + diff --git a/MDK-ARM/.vscode/uv4.log b/MDK-ARM/.vscode/uv4.log index d53ce22..8f4f133 100644 --- a/MDK-ARM/.vscode/uv4.log +++ b/MDK-ARM/.vscode/uv4.log @@ -1,9 +1,76 @@ -*** Using Compiler 'V5.06 update 7 (build 960)', folder: 'D:\keil\ARM\ARMCC\Bin' -Build target 'R1' +*** Using Compiler 'V5.06 update 7 (build 960)', folder: 'D:\Develop\keil\ARM\ARMCC\Bin' +Rebuild target 'R1' +assembling startup_stm32f407xx.s... +compiling crc.c... +compiling dma.c... +compiling gpio.c... +compiling tim.c... +compiling stm32f4xx_hal_rcc_ex.c... +compiling spi.c... +compiling stm32f4xx_hal_can.c... +compiling main.c... +compiling usart.c... +compiling freertos.c... +compiling stm32f4xx_it.c... +compiling can.c... +compiling stm32f4xx_hal_msp.c... +compiling stm32f4xx_hal_rcc.c... +compiling stm32f4xx_hal_cortex.c... +compiling stm32f4xx_hal_pwr.c... +compiling stm32f4xx_hal_crc.c... +compiling stm32f4xx_hal_dma.c... +compiling stm32f4xx_hal_pwr_ex.c... +compiling stm32f4xx_hal_flash_ex.c... +compiling stm32f4xx_hal_flash_ramfunc.c... +compiling stm32f4xx_hal_flash.c... +compiling stm32f4xx_hal.c... +compiling stm32f4xx_hal_gpio.c... +compiling stm32f4xx_hal_exti.c... +compiling croutine.c... +compiling stm32f4xx_hal_dma_ex.c... +compiling stm32f4xx_hal_spi.c... +compiling event_groups.c... +compiling list.c... +compiling stream_buffer.c... +compiling queue.c... +compiling heap_4.c... +compiling timers.c... +compiling stm32f4xx_hal_tim.c... +compiling port.c... +compiling tasks.c... +compiling calc_lib.c... +compiling crc_ccitt.c... +compiling kalman.c... +compiling gpio_it.c... +compiling system_stm32f4xx.c... +compiling can_it.c... +compiling bsp_delay.c... +compiling can_init.c... +compiling bsp_buzzer.c... +compiling uart_it.c... +compiling stm32f4xx_hal_tim_ex.c... +compiling stm32f4xx_hal_uart.c... +compiling user_math.c... +compiling filter.c... +compiling pid.c... +compiling buzzer.c... +compiling userTask.c... +compiling cmsis_os2.c... +compiling detect.c... +compiling vofa.c... +compiling GO_M8010_6_Driver.c... +compiling remote_control.c... +compiling initTask.c... +compiling nuc.c... +compiling nucTask.cpp... +compiling encodeCan.cpp... +compiling djiMotor.c... compiling ballTask.cpp... compiling shootTask.cpp... +compiling shoot.cpp... +compiling ball.cpp... linking... -Program Size: Code=31984 RO-data=1832 RW-data=272 ZI-data=32264 +Program Size: Code=31312 RO-data=1832 RW-data=280 ZI-data=32264 FromELF: creating hex file... "R1\R1.axf" - 0 Error(s), 0 Warning(s). -Build Time Elapsed: 00:00:05 +Build Time Elapsed: 00:00:25 diff --git a/MDK-ARM/.vscode/uv4.log.lock b/MDK-ARM/.vscode/uv4.log.lock index 36bc0c7..32571ad 100644 --- a/MDK-ARM/.vscode/uv4.log.lock +++ b/MDK-ARM/.vscode/uv4.log.lock @@ -1 +1 @@ -2025/7/16 22:30:59 \ No newline at end of file +2025/8/27 9:23:25 \ No newline at end of file diff --git a/MDK-ARM/R1.uvoptx b/MDK-ARM/R1.uvoptx index 2a42658..a1c0ce5 100644 --- a/MDK-ARM/R1.uvoptx +++ b/MDK-ARM/R1.uvoptx @@ -12,7 +12,7 @@ *.lib *.txt; *.h; *.inc; *.md *.plm - *.cpp + *.cpp; *.cc; *.cxx 0 @@ -26,7 +26,7 @@ 0x4 ARM-ADS - 12000000 + 25000000 1 1 @@ -93,7 +93,7 @@ 1 1 1 - 1 + 0 1 1 1 @@ -117,11 +117,6 @@ BIN\CMSIS_AGDI.dll - - 0 - CMSIS_AGDI - -X"Any" -UAny -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) - 0 ARMRTXEVENTFLAGS @@ -144,100 +139,34 @@ 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32F4xx_1024 -FS08000000 -FL0100000 -FP0($$Device:STM32F407IGHx$CMSIS\Flash\STM32F4xx_1024.FLM)) + CMSIS_AGDI + -X"Any" -UAny -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) 0 - ST-LINKIII-KEIL_SWO - -U00160029510000164E574E32 -O2254 -SF10000 -C0 -A0 -I0 -HNlocalhost -HP7184 -P1 -N00("ARM CoreSight SW-DP (ARM Core") -D00(2BA01477) -L00(0) -TO131090 -TC10000000 -TT10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO15 -FD20000000 -FC800 -FN1 -FF0STM32F4xx_1024.FLM -FS08000000 -FL0100000 -FP0($$Device:STM32F407IGHx$CMSIS\Flash\STM32F4xx_1024.FLM) + UL2CM3 + UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32F4xx_1024 -FS08000000 -FL0100000 -FP0($$Device:STM32F407IGHx$CMSIS\Flash\STM32F4xx_1024.FLM)) -<<<<<<< HEAD -<<<<<<< HEAD -======= ->>>>>>> 上层测试 0 1 - rc_ctrl,0x0A + and1 1 1 - shoot,0x0A - - - 2 - 1 -<<<<<<< HEAD - ball,0x0A -======= - ball ->>>>>>> 上层测试 - - - 3 - 1 -<<<<<<< HEAD - nucbuf -======= - and1 ->>>>>>> 上层测试 - - - 4 - 1 -<<<<<<< HEAD - nuc_v -======= - and1 ->>>>>>> 上层测试 - - - 5 - 1 -<<<<<<< HEAD - abc,0x0A -======= - nucbuf ->>>>>>> 上层测试 - - - 6 - 1 -<<<<<<< HEAD - shoot_wait,0x0A - - - 7 - 1 - error_code + ws -======= ->>>>>>> 上层测试 -======= - drop_message,0x0A - - ->>>>>>> 上层测试 - - - 4 - 0 - nucbuf - 0 - - 0 0 - 1 + 0 1 0 0 @@ -256,7 +185,7 @@ 0 0 0 - 1 + 0 0 0 0 @@ -276,7 +205,7 @@ 1 - 0 + 1 0 2 10000000 @@ -990,7 +919,7 @@ User/device - 1 + 0 0 0 0 @@ -1114,7 +1043,7 @@ User/task - 1 + 0 0 0 0 diff --git a/MDK-ARM/R1.uvprojx b/MDK-ARM/R1.uvprojx index 68230c7..f84a542 100644 --- a/MDK-ARM/R1.uvprojx +++ b/MDK-ARM/R1.uvprojx @@ -137,7 +137,7 @@ 4101 1 - BIN\UL2V8M.DLL + BIN\UL2CM3.DLL diff --git a/User/bsp/TopDefine.h b/User/bsp/TopDefine.h index 9524760..9d74009 100644 --- a/User/bsp/TopDefine.h +++ b/User/bsp/TopDefine.h @@ -16,7 +16,7 @@ #endif -#define ONE_CONTROL 1 +#define ONE_CONTROL 0 //是否使用大疆DT7遥控器 #ifndef DT7 diff --git a/User/module/shoot.cpp b/User/module/shoot.cpp index 25a7c46..7018515 100644 --- a/User/module/shoot.cpp +++ b/User/module/shoot.cpp @@ -39,7 +39,7 @@ const fp32 Shoot::M2006_angle_PID[3] = {15, 0.1, 0}; #define CHANEGE_POS -205 #define GO_ERROR 1.0f #define Tigger_DO -10 -#define Tigger_ZERO 125 +#define Tigger_ZERO 140 #define Tigger_ERROR 3 float knob_increment; @@ -172,6 +172,7 @@ int Shoot::GO_SendData(float pos, float limit) // 左旋 sw[7] 200 --1800 +float ws=-5.0f; float and1=0.0f; void Shoot::rc_mode() @@ -273,8 +274,12 @@ void Shoot::shoot_control() { case VSION: //fire_pos = distance; // 视觉拟合的力 - //fire_pos =shoot_fitting(distance)+and1; - fire_pos = INIT_POS + knob_increment; // 根据旋钮值调整发射位置 + if(distance<=3.1f) + { + ws=-8.0f; + } + fire_pos =shoot_fitting(distance)+and1+ws; + //fire_pos = INIT_POS + knob_increment; // 根据旋钮值调整发射位置 switch (rc_key) { @@ -316,7 +321,7 @@ void Shoot::shoot_control() case PASS: // 实时可调蓄力位置 //fire_pos = INIT_POS + knob_increment; // 根据旋钮值调整发射位置 - fire_pos =pass_fitting(pass_distance); + fire_pos =pass_fitting(6.9f); switch (rc_key) { case DOWN1: