拆分版

This commit is contained in:
xiaoshuo 2025-08-28 19:26:53 +08:00
parent 4d90b38daf
commit 2b3828905b
8 changed files with 125 additions and 116 deletions

View File

@ -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",

View File

@ -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

View File

@ -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

View File

@ -1 +1 @@
2025/7/16 22:30:59
2025/8/27 9:23:25

View File

@ -12,7 +12,7 @@
<lExt>*.lib</lExt>
<tExt>*.txt; *.h; *.inc; *.md</tExt>
<pExt>*.plm</pExt>
<CppX>*.cpp</CppX>
<CppX>*.cpp; *.cc; *.cxx</CppX>
<nMigrate>0</nMigrate>
</Extensions>
@ -26,7 +26,7 @@
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<TargetOption>
<CLKADS>12000000</CLKADS>
<CLKADS>25000000</CLKADS>
<OPTTT>
<gFlags>1</gFlags>
<BeepAtEnd>1</BeepAtEnd>
@ -93,7 +93,7 @@
<tRbreak>1</tRbreak>
<tRwatch>1</tRwatch>
<tRmem>1</tRmem>
<tRfunc>1</tRfunc>
<tRfunc>0</tRfunc>
<tRbox>1</tRbox>
<tRtrace>1</tRtrace>
<sRSysVw>1</sRSysVw>
@ -117,11 +117,6 @@
<pMon>BIN\CMSIS_AGDI.dll</pMon>
</DebugOpt>
<TargetDriverDllRegistry>
<SetRegEntry>
<Number>0</Number>
<Key>CMSIS_AGDI</Key>
<Name>-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)</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>ARMRTXEVENTFLAGS</Key>
@ -144,100 +139,34 @@
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>UL2CM3</Key>
<Name>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32F4xx_1024 -FS08000000 -FL0100000 -FP0($$Device:STM32F407IGHx$CMSIS\Flash\STM32F4xx_1024.FLM))</Name>
<Key>CMSIS_AGDI</Key>
<Name>-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)</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>ST-LINKIII-KEIL_SWO</Key>
<Name>-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)</Name>
<Key>UL2CM3</Key>
<Name>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32F4xx_1024 -FS08000000 -FL0100000 -FP0($$Device:STM32F407IGHx$CMSIS\Flash\STM32F4xx_1024.FLM))</Name>
</SetRegEntry>
</TargetDriverDllRegistry>
<Breakpoint/>
<<<<<<< HEAD
<<<<<<< HEAD
=======
>>>>>>> 上层测试
<WatchWindow1>
<Ww>
<count>0</count>
<WinNumber>1</WinNumber>
<ItemText>rc_ctrl,0x0A</ItemText>
<ItemText>and1</ItemText>
</Ww>
<Ww>
<count>1</count>
<WinNumber>1</WinNumber>
<ItemText>shoot,0x0A</ItemText>
</Ww>
<Ww>
<count>2</count>
<WinNumber>1</WinNumber>
<<<<<<< HEAD
<ItemText>ball,0x0A</ItemText>
=======
<ItemText>ball</ItemText>
>>>>>>> 上层测试
</Ww>
<Ww>
<count>3</count>
<WinNumber>1</WinNumber>
<<<<<<< HEAD
<ItemText>nucbuf</ItemText>
=======
<ItemText>and1</ItemText>
>>>>>>> 上层测试
</Ww>
<Ww>
<count>4</count>
<WinNumber>1</WinNumber>
<<<<<<< HEAD
<ItemText>nuc_v</ItemText>
=======
<ItemText>and1</ItemText>
>>>>>>> 上层测试
</Ww>
<Ww>
<count>5</count>
<WinNumber>1</WinNumber>
<<<<<<< HEAD
<ItemText>abc,0x0A</ItemText>
=======
<ItemText>nucbuf</ItemText>
>>>>>>> 上层测试
</Ww>
<Ww>
<count>6</count>
<WinNumber>1</WinNumber>
<<<<<<< HEAD
<ItemText>shoot_wait,0x0A</ItemText>
</Ww>
<Ww>
<count>7</count>
<WinNumber>1</WinNumber>
<ItemText>error_code</ItemText>
<ItemText>ws</ItemText>
</Ww>
</WatchWindow1>
=======
>>>>>>> 上层测试
=======
<ItemText>drop_message,0x0A</ItemText>
</Ww>
</WatchWindow1>
>>>>>>> 上层测试
<MemoryWindow4>
<Mm>
<WinNumber>4</WinNumber>
<SubType>0</SubType>
<ItemText>nucbuf</ItemText>
<AccSizeX>0</AccSizeX>
</Mm>
</MemoryWindow4>
<Tracepoint>
<THDelay>0</THDelay>
</Tracepoint>
<DebugFlag>
<trace>0</trace>
<periodic>1</periodic>
<periodic>0</periodic>
<aLwin>1</aLwin>
<aCover>0</aCover>
<aSer1>0</aSer1>
@ -256,7 +185,7 @@
<aPa1>0</aPa1>
<AscS4>0</AscS4>
<aSer4>0</aSer4>
<StkLoc>1</StkLoc>
<StkLoc>0</StkLoc>
<TrcWin>0</TrcWin>
<newCpu>0</newCpu>
<uProt>0</uProt>
@ -276,7 +205,7 @@
<pMultCmdsp></pMultCmdsp>
<DebugDescription>
<Enable>1</Enable>
<EnableFlashSeq>0</EnableFlashSeq>
<EnableFlashSeq>1</EnableFlashSeq>
<EnableLog>0</EnableLog>
<Protocol>2</Protocol>
<DbgClock>10000000</DbgClock>
@ -990,7 +919,7 @@
<Group>
<GroupName>User/device</GroupName>
<tvExp>1</tvExp>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
@ -1114,7 +1043,7 @@
<Group>
<GroupName>User/task</GroupName>
<tvExp>1</tvExp>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>

View File

@ -137,7 +137,7 @@
<DriverSelection>4101</DriverSelection>
</Flash1>
<bUseTDR>1</bUseTDR>
<Flash2>BIN\UL2V8M.DLL</Flash2>
<Flash2>BIN\UL2CM3.DLL</Flash2>
<Flash3></Flash3>
<Flash4></Flash4>
<pFcarmOut></pFcarmOut>

View File

@ -16,7 +16,7 @@
#endif
#define ONE_CONTROL 1
#define ONE_CONTROL 0
//是否使用大疆DT7遥控器
#ifndef DT7

View File

@ -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: