各模块cmd通了,遥控器通道5有问题

This commit is contained in:
yunhai8432 2026-01-22 12:08:39 +08:00
parent 657eea0539
commit 7dc0a28994
17 changed files with 5114 additions and 5228 deletions

File diff suppressed because one or more lines are too long

View File

@ -1093,7 +1093,7 @@
<Group> <Group>
<GroupName>device</GroupName> <GroupName>device</GroupName>
<tvExp>1</tvExp> <tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg> <tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel> <cbSel>0</cbSel>
<RteFlg>0</RteFlg> <RteFlg>0</RteFlg>
@ -1233,7 +1233,7 @@
<Group> <Group>
<GroupName>module</GroupName> <GroupName>module</GroupName>
<tvExp>1</tvExp> <tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg> <tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel> <cbSel>0</cbSel>
<RteFlg>0</RteFlg> <RteFlg>0</RteFlg>
@ -1301,7 +1301,7 @@
<Group> <Group>
<GroupName>task</GroupName> <GroupName>task</GroupName>
<tvExp>1</tvExp> <tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg> <tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel> <cbSel>0</cbSel>
<RteFlg>0</RteFlg> <RteFlg>0</RteFlg>
@ -1441,7 +1441,7 @@
<Group> <Group>
<GroupName>cmd</GroupName> <GroupName>cmd</GroupName>
<tvExp>1</tvExp> <tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg> <tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel> <cbSel>0</cbSel>
<RteFlg>0</RteFlg> <RteFlg>0</RteFlg>

File diff suppressed because it is too large Load Diff

View File

@ -3,7 +3,7 @@
<title>Static Call Graph - [Steering Wheel_Infatry\Steering Wheel_Infatry.axf]</title></head> <title>Static Call Graph - [Steering Wheel_Infatry\Steering Wheel_Infatry.axf]</title></head>
<body><HR> <body><HR>
<H1>Static Call Graph for image Steering Wheel_Infatry\Steering Wheel_Infatry.axf</H1><HR> <H1>Static Call Graph for image Steering Wheel_Infatry\Steering Wheel_Infatry.axf</H1><HR>
<BR><P>#&#060CALLGRAPH&#062# ARM Linker, 6160001: Last Updated: Thu Jan 22 01:29:42 2026 <BR><P>#&#060CALLGRAPH&#062# ARM Linker, 6160001: Last Updated: Thu Jan 22 12:03:07 2026
<BR><P> <BR><P>
<H3>Maximum Stack Usage = 328 bytes + Unknown(Functions without stacksize, Cycles, Untraceable Function Pointers)</H3><H3> <H3>Maximum Stack Usage = 328 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>
@ -1161,8 +1161,7 @@ Global Symbols
</UL> </UL>
<BR>[Calls]<UL><LI><a href="#[113]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;CMD_Behavior_ProcessAll <BR>[Calls]<UL><LI><a href="#[113]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;CMD_Behavior_ProcessAll
</UL> </UL>
<BR>[Called By]<UL><LI><a href="#[7f]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Task_cmd <BR>[Called By]<UL><LI><a href="#[11c]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;CMD_Update
<LI><a href="#[11c]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;CMD_Update
</UL> </UL>
<P><STRONG><a name="[8c]"></a>CMD_Behavior_Handle_ACCELERATE</STRONG> (Thumb, 36 bytes, Stack size 0 bytes, cmd_behavior.o(.text.CMD_Behavior_Handle_ACCELERATE)) <P><STRONG><a name="[8c]"></a>CMD_Behavior_Handle_ACCELERATE</STRONG> (Thumb, 36 bytes, Stack size 0 bytes, cmd_behavior.o(.text.CMD_Behavior_Handle_ACCELERATE))
@ -1213,13 +1212,13 @@ Global Symbols
</UL> </UL>
<BR>[Calls]<UL><LI><a href="#[114]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;CMD_Behavior_IsTriggered <BR>[Calls]<UL><LI><a href="#[114]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;CMD_Behavior_IsTriggered
</UL> </UL>
<BR>[Called By]<UL><LI><a href="#[8]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;CMD_PC_BuildShootCmd <BR>[Called By]<UL><LI><a href="#[112]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;CMD_Arbitrate
<LI><a href="#[8]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;CMD_PC_BuildShootCmd
<LI><a href="#[7]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;CMD_PC_BuildGimbalCmd <LI><a href="#[7]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;CMD_PC_BuildGimbalCmd
<LI><a href="#[6]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;CMD_PC_BuildChassisCmd <LI><a href="#[6]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;CMD_PC_BuildChassisCmd
<LI><a href="#[112]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;CMD_Arbitrate
</UL> </UL>
<P><STRONG><a name="[1]"></a>CMD_ET16s_GetInput</STRONG> (Thumb, 244 bytes, Stack size 24 bytes, cmd_adapter.o(.text.CMD_ET16s_GetInput)) <P><STRONG><a name="[1]"></a>CMD_ET16s_GetInput</STRONG> (Thumb, 236 bytes, Stack size 24 bytes, cmd_adapter.o(.text.CMD_ET16s_GetInput))
<BR><BR>[Stack]<UL><LI>Max Depth = 24<LI>Call Chain = CMD_ET16s_GetInput <BR><BR>[Stack]<UL><LI>Max Depth = 24<LI>Call Chain = CMD_ET16s_GetInput
</UL> </UL>
<BR>[Address Reference Count : 1]<UL><LI> cmd_adapter.o(.data.g_adapter_ET16s) <BR>[Address Reference Count : 1]<UL><LI> cmd_adapter.o(.data.g_adapter_ET16s)
@ -1241,8 +1240,7 @@ Global Symbols
<LI><a href="#[118]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__aeabi_ul2f <LI><a href="#[118]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__aeabi_ul2f
<LI><a href="#[119]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;CMD_SetOfflineMode <LI><a href="#[119]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;CMD_SetOfflineMode
</UL> </UL>
<BR>[Called By]<UL><LI><a href="#[7f]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Task_cmd <BR>[Called By]<UL><LI><a href="#[11c]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;CMD_Update
<LI><a href="#[11c]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;CMD_Update
</UL> </UL>
<P><STRONG><a name="[11a]"></a>CMD_Init</STRONG> (Thumb, 40 bytes, Stack size 16 bytes, cmd_1.o(.text.CMD_Init)) <P><STRONG><a name="[11a]"></a>CMD_Init</STRONG> (Thumb, 40 bytes, Stack size 16 bytes, cmd_1.o(.text.CMD_Init))
@ -1271,8 +1269,7 @@ Global Symbols
</UL> </UL>
<BR>[Calls]<UL><LI><a href="#[11e]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;CMD_Adapter_GetInput <BR>[Calls]<UL><LI><a href="#[11e]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;CMD_Adapter_GetInput
</UL> </UL>
<BR>[Called By]<UL><LI><a href="#[7f]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Task_cmd <BR>[Called By]<UL><LI><a href="#[11c]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;CMD_Update
<LI><a href="#[11c]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;CMD_Update
</UL> </UL>
<P><STRONG><a name="[122]"></a>Chassis_Control</STRONG> (Thumb, 480 bytes, Stack size 40 bytes, chassis.o(.text.Chassis_Control)) <P><STRONG><a name="[122]"></a>Chassis_Control</STRONG> (Thumb, 480 bytes, Stack size 40 bytes, chassis.o(.text.Chassis_Control))
@ -1382,7 +1379,7 @@ Global Symbols
<P><STRONG><a name="[10]"></a>DebugMon_Handler</STRONG> (Thumb, 2 bytes, Stack size 0 bytes, stm32f4xx_it.o(.text.DebugMon_Handler)) <P><STRONG><a name="[10]"></a>DebugMon_Handler</STRONG> (Thumb, 2 bytes, Stack size 0 bytes, stm32f4xx_it.o(.text.DebugMon_Handler))
<BR>[Address Reference Count : 1]<UL><LI> startup_stm32f407xx.o(RESET) <BR>[Address Reference Count : 1]<UL><LI> startup_stm32f407xx.o(RESET)
</UL> </UL>
<P><STRONG><a name="[133]"></a>ET16S_ParseRC</STRONG> (Thumb, 146 bytes, Stack size 16 bytes, et16s.o(.text.ET16S_ParseRC)) <P><STRONG><a name="[133]"></a>ET16S_ParseRC</STRONG> (Thumb, 174 bytes, Stack size 16 bytes, et16s.o(.text.ET16S_ParseRC))
<BR><BR>[Stack]<UL><LI>Max Depth = 96<LI>Call Chain = ET16S_ParseRC &rArr; ET16s_ParseRaw &rArr; __aeabi_f2d <BR><BR>[Stack]<UL><LI>Max Depth = 96<LI>Call Chain = ET16S_ParseRC &rArr; ET16s_ParseRaw &rArr; __aeabi_f2d
</UL> </UL>
<BR>[Calls]<UL><LI><a href="#[135]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Keymap <BR>[Calls]<UL><LI><a href="#[135]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Keymap
@ -1395,7 +1392,7 @@ Global Symbols
<BR><BR>[Called By]<UL><LI><a href="#[81]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Task_ET16s <BR><BR>[Called By]<UL><LI><a href="#[81]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Task_ET16s
</UL> </UL>
<P><STRONG><a name="[134]"></a>ET16s_ParseRaw</STRONG> (Thumb, 584 bytes, Stack size 64 bytes, et16s.o(.text.ET16s_ParseRaw)) <P><STRONG><a name="[134]"></a>ET16s_ParseRaw</STRONG> (Thumb, 616 bytes, Stack size 64 bytes, et16s.o(.text.ET16s_ParseRaw))
<BR><BR>[Stack]<UL><LI>Max Depth = 80<LI>Call Chain = ET16s_ParseRaw &rArr; __aeabi_f2d <BR><BR>[Stack]<UL><LI>Max Depth = 80<LI>Call Chain = ET16s_ParseRaw &rArr; __aeabi_f2d
</UL> </UL>
<BR>[Calls]<UL><LI><a href="#[136]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;map_fp32 <BR>[Calls]<UL><LI><a href="#[136]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;map_fp32
@ -2932,7 +2929,7 @@ Global Symbols
</UL> </UL>
<BR>[Address Reference Count : 1]<UL><LI> init.o(.text.Task_Init) <BR>[Address Reference Count : 1]<UL><LI> init.o(.text.Task_Init)
</UL> </UL>
<P><STRONG><a name="[7f]"></a>Task_cmd</STRONG> (Thumb, 248 bytes, Stack size 8 bytes, cmd.o(.text.Task_cmd)) <P><STRONG><a name="[7f]"></a>Task_cmd</STRONG> (Thumb, 232 bytes, Stack size 8 bytes, cmd.o(.text.Task_cmd))
<BR><BR>[Stack]<UL><LI>Max Depth = 160 + Unknown Stack Size <BR><BR>[Stack]<UL><LI>Max Depth = 160 + Unknown Stack Size
<LI>Call Chain = Task_cmd &rArr; osMessageQueuePut &rArr; xQueueGenericSend &rArr; xTaskResumeAll &rArr; xTaskIncrementTick <LI>Call Chain = Task_cmd &rArr; osMessageQueuePut &rArr; xQueueGenericSend &rArr; xTaskResumeAll &rArr; xTaskIncrementTick
</UL> </UL>
@ -2946,11 +2943,8 @@ Global Symbols
<LI><a href="#[1ef]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__aeabi_ui2d <LI><a href="#[1ef]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__aeabi_ui2d
<LI><a href="#[1f1]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__aeabi_d2uiz <LI><a href="#[1f1]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__aeabi_d2uiz
<LI><a href="#[1f0]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__aeabi_ddiv <LI><a href="#[1f0]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;__aeabi_ddiv
<LI><a href="#[11d]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;CMD_UpdateInput
<LI><a href="#[11c]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;CMD_Update <LI><a href="#[11c]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;CMD_Update
<LI><a href="#[11a]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;CMD_Init <LI><a href="#[11a]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;CMD_Init
<LI><a href="#[116]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;CMD_GenerateCommands
<LI><a href="#[112]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;CMD_Arbitrate
<LI><a href="#[1fc]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Config_GetRobotParam <LI><a href="#[1fc]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;Config_GetRobotParam
</UL> </UL>
<BR>[Address Reference Count : 1]<UL><LI> init.o(.text.Task_Init) <BR>[Address Reference Count : 1]<UL><LI> init.o(.text.Task_Init)
@ -5364,7 +5358,7 @@ Local Symbols
<P><STRONG><a name="[4]"></a>CMD_RC_BuildGimbalCmd</STRONG> (Thumb, 72 bytes, Stack size 0 bytes, cmd_1.o(.text.CMD_RC_BuildGimbalCmd)) <P><STRONG><a name="[4]"></a>CMD_RC_BuildGimbalCmd</STRONG> (Thumb, 72 bytes, Stack size 0 bytes, cmd_1.o(.text.CMD_RC_BuildGimbalCmd))
<BR>[Address Reference Count : 1]<UL><LI> cmd_1.o(.data.sourceHandlers) <BR>[Address Reference Count : 1]<UL><LI> cmd_1.o(.data.sourceHandlers)
</UL> </UL>
<P><STRONG><a name="[5]"></a>CMD_RC_BuildShootCmd</STRONG> (Thumb, 44 bytes, Stack size 0 bytes, cmd_1.o(.text.CMD_RC_BuildShootCmd)) <P><STRONG><a name="[5]"></a>CMD_RC_BuildShootCmd</STRONG> (Thumb, 56 bytes, Stack size 0 bytes, cmd_1.o(.text.CMD_RC_BuildShootCmd))
<BR>[Address Reference Count : 1]<UL><LI> cmd_1.o(.data.sourceHandlers) <BR>[Address Reference Count : 1]<UL><LI> cmd_1.o(.data.sourceHandlers)
</UL> </UL>
<P><STRONG><a name="[119]"></a>CMD_SetOfflineMode</STRONG> (Thumb, 18 bytes, Stack size 0 bytes, cmd_1.o(.text.CMD_SetOfflineMode)) <P><STRONG><a name="[119]"></a>CMD_SetOfflineMode</STRONG> (Thumb, 18 bytes, Stack size 0 bytes, cmd_1.o(.text.CMD_SetOfflineMode))

File diff suppressed because it is too large Load Diff

View File

@ -2205,7 +2205,7 @@ I (..\Middlewares\Third_Party\FreeRTOS\Source\CMSIS_RTOS_V2\cmsis_os2.h)(0x68B05
I (..\User\device\motor_rm.h)(0x69707226) I (..\User\device\motor_rm.h)(0x69707226)
I (..\User\bsp\uart.h)(0x69707226) I (..\User\bsp\uart.h)(0x69707226)
I (..\Core\Inc\usart.h)(0x69455093) I (..\Core\Inc\usart.h)(0x69455093)
F (..\User\device\ET16s.c)(0x69710BD2)(-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 -O1 -ffunction-sections -Wno-packed -Wno-missing-variable-declarations -Wno-missing-prototypes -Wno-missing-noreturn -Wno-sign-conversion -Wno-nonportable-include-path -Wno-reserved-id-macro -Wno-unused-macros -Wno-documentation-unknown-command -Wno-documentation -Wno-license-management -Wno-parentheses-equality -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 ../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 -I ../User/bsp -I ../User/component -I ../User/device -I ../User/module -I ../User/task -I ../User/module/cmd -I./RTE/_Steering_Wheel_Infatry -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 "steering wheel_infatry/et16s.o" -MD) F (..\User\device\ET16s.c)(0x6971A12F)(-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 -O1 -ffunction-sections -Wno-packed -Wno-missing-variable-declarations -Wno-missing-prototypes -Wno-missing-noreturn -Wno-sign-conversion -Wno-nonportable-include-path -Wno-reserved-id-macro -Wno-unused-macros -Wno-documentation-unknown-command -Wno-documentation -Wno-license-management -Wno-parentheses-equality -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 ../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 -I ../User/bsp -I ../User/component -I ../User/device -I ../User/module -I ../User/task -I ../User/module/cmd -I./RTE/_Steering_Wheel_Infatry -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 "steering wheel_infatry/et16s.o" -MD)
I (..\User\device\ET16s.h)(0x6970FB62) I (..\User\device\ET16s.h)(0x6970FB62)
I (..\User\device\device.h)(0x69707226) I (..\User\device\device.h)(0x69707226)
I (D:\Keil_v5\ARM\ARMCLANG\include\stdbool.h)(0x6035A4A8) I (D:\Keil_v5\ARM\ARMCLANG\include\stdbool.h)(0x6035A4A8)
@ -2417,7 +2417,7 @@ I (..\User\bsp\time.h)(0x69707226)
I (..\User\component\user_math.h)(0x69707226) I (..\User\component\user_math.h)(0x69707226)
I (D:\Keil_v5\ARM\ARMCLANG\include\float.h)(0x6035A4A0) I (D:\Keil_v5\ARM\ARMCLANG\include\float.h)(0x6035A4A0)
I (D:\Keil_v5\ARM\ARMCLANG\include\math.h)(0x6035A4A8) I (D:\Keil_v5\ARM\ARMCLANG\include\math.h)(0x6035A4A8)
F (..\User\module\config.c)(0x69710365)(-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 -O1 -ffunction-sections -Wno-packed -Wno-missing-variable-declarations -Wno-missing-prototypes -Wno-missing-noreturn -Wno-sign-conversion -Wno-nonportable-include-path -Wno-reserved-id-macro -Wno-unused-macros -Wno-documentation-unknown-command -Wno-documentation -Wno-license-management -Wno-parentheses-equality -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 ../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 -I ../User/bsp -I ../User/component -I ../User/device -I ../User/module -I ../User/task -I ../User/module/cmd -I./RTE/_Steering_Wheel_Infatry -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 "steering wheel_infatry/config.o" -MD) F (..\User\module\config.c)(0x6971A12F)(-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 -O1 -ffunction-sections -Wno-packed -Wno-missing-variable-declarations -Wno-missing-prototypes -Wno-missing-noreturn -Wno-sign-conversion -Wno-nonportable-include-path -Wno-reserved-id-macro -Wno-unused-macros -Wno-documentation-unknown-command -Wno-documentation -Wno-license-management -Wno-parentheses-equality -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 ../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 -I ../User/bsp -I ../User/component -I ../User/device -I ../User/module -I ../User/task -I ../User/module/cmd -I./RTE/_Steering_Wheel_Infatry -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 "steering wheel_infatry/config.o" -MD)
I (..\User\component\user_math.h)(0x69707226) I (..\User\component\user_math.h)(0x69707226)
I (D:\Keil_v5\ARM\ARMCLANG\include\float.h)(0x6035A4A0) I (D:\Keil_v5\ARM\ARMCLANG\include\float.h)(0x6035A4A0)
I (D:\Keil_v5\ARM\ARMCLANG\include\math.h)(0x6035A4A8) I (D:\Keil_v5\ARM\ARMCLANG\include\math.h)(0x6035A4A8)
@ -2748,7 +2748,7 @@ I (..\Middlewares\Third_Party\FreeRTOS\Source\portable\RVDS\ARM_CM4F\portmacro.h
I (..\Middlewares\Third_Party\FreeRTOS\Source\include\mpu_wrappers.h)(0x68B055DB) I (..\Middlewares\Third_Party\FreeRTOS\Source\include\mpu_wrappers.h)(0x68B055DB)
I (..\Middlewares\Third_Party\FreeRTOS\Source\include\task.h)(0x68B055DB) I (..\Middlewares\Third_Party\FreeRTOS\Source\include\task.h)(0x68B055DB)
I (..\Middlewares\Third_Party\FreeRTOS\Source\include\list.h)(0x68B055DB) I (..\Middlewares\Third_Party\FreeRTOS\Source\include\list.h)(0x68B055DB)
F (..\User\task\cmd.c)(0x69710B51)(-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 -O1 -ffunction-sections -Wno-packed -Wno-missing-variable-declarations -Wno-missing-prototypes -Wno-missing-noreturn -Wno-sign-conversion -Wno-nonportable-include-path -Wno-reserved-id-macro -Wno-unused-macros -Wno-documentation-unknown-command -Wno-documentation -Wno-license-management -Wno-parentheses-equality -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 ../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 -I ../User/bsp -I ../User/component -I ../User/device -I ../User/module -I ../User/task -I ../User/module/cmd -I./RTE/_Steering_Wheel_Infatry -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 "steering wheel_infatry/cmd.o" -MD) F (..\User\task\cmd.c)(0x697114BF)(-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 -O1 -ffunction-sections -Wno-packed -Wno-missing-variable-declarations -Wno-missing-prototypes -Wno-missing-noreturn -Wno-sign-conversion -Wno-nonportable-include-path -Wno-reserved-id-macro -Wno-unused-macros -Wno-documentation-unknown-command -Wno-documentation -Wno-license-management -Wno-parentheses-equality -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 ../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 -I ../User/bsp -I ../User/component -I ../User/device -I ../User/module -I ../User/task -I ../User/module/cmd -I./RTE/_Steering_Wheel_Infatry -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 "steering wheel_infatry/cmd.o" -MD)
I (..\User\task\user_task.h)(0x6970D2DA) I (..\User\task\user_task.h)(0x6970D2DA)
I (..\Middlewares\Third_Party\FreeRTOS\Source\CMSIS_RTOS_V2\cmsis_os2.h)(0x68B055DB) I (..\Middlewares\Third_Party\FreeRTOS\Source\CMSIS_RTOS_V2\cmsis_os2.h)(0x68B055DB)
I (D:\Keil_v5\ARM\ARMCLANG\include\stdint.h)(0x6035A4A8) I (D:\Keil_v5\ARM\ARMCLANG\include\stdint.h)(0x6035A4A8)
@ -3249,7 +3249,7 @@ I (..\Middlewares\Third_Party\FreeRTOS\Source\portable\RVDS\ARM_CM4F\portmacro.h
I (..\Middlewares\Third_Party\FreeRTOS\Source\include\mpu_wrappers.h)(0x68B055DB) I (..\Middlewares\Third_Party\FreeRTOS\Source\include\mpu_wrappers.h)(0x68B055DB)
I (..\Middlewares\Third_Party\FreeRTOS\Source\include\task.h)(0x68B055DB) I (..\Middlewares\Third_Party\FreeRTOS\Source\include\task.h)(0x68B055DB)
I (..\Middlewares\Third_Party\FreeRTOS\Source\include\list.h)(0x68B055DB) I (..\Middlewares\Third_Party\FreeRTOS\Source\include\list.h)(0x68B055DB)
F (..\User\module\cmd\cmd.c)(0x69710529)(-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 -O1 -ffunction-sections -Wno-packed -Wno-missing-variable-declarations -Wno-missing-prototypes -Wno-missing-noreturn -Wno-sign-conversion -Wno-nonportable-include-path -Wno-reserved-id-macro -Wno-unused-macros -Wno-documentation-unknown-command -Wno-documentation -Wno-license-management -Wno-parentheses-equality -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 ../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 -I ../User/bsp -I ../User/component -I ../User/device -I ../User/module -I ../User/task -I ../User/module/cmd -I./RTE/_Steering_Wheel_Infatry -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 "steering wheel_infatry/cmd_1.o" -MD) F (..\User\module\cmd\cmd.c)(0x6971A12F)(-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 -O1 -ffunction-sections -Wno-packed -Wno-missing-variable-declarations -Wno-missing-prototypes -Wno-missing-noreturn -Wno-sign-conversion -Wno-nonportable-include-path -Wno-reserved-id-macro -Wno-unused-macros -Wno-documentation-unknown-command -Wno-documentation -Wno-license-management -Wno-parentheses-equality -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 ../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 -I ../User/bsp -I ../User/component -I ../User/device -I ../User/module -I ../User/task -I ../User/module/cmd -I./RTE/_Steering_Wheel_Infatry -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 "steering wheel_infatry/cmd_1.o" -MD)
I (..\User\module\cmd\cmd.h)(0x69710302) I (..\User\module\cmd\cmd.h)(0x69710302)
I (..\User\module\cmd\cmd_types.h)(0x69710063) I (..\User\module\cmd\cmd_types.h)(0x69710063)
I (D:\Keil_v5\ARM\ARMCLANG\include\stdint.h)(0x6035A4A8) I (D:\Keil_v5\ARM\ARMCLANG\include\stdint.h)(0x6035A4A8)
@ -3323,7 +3323,7 @@ I (..\User\device\motor_dm.h)(0x69707226)
I (..\User\module\shoot.h)(0x6968CB81) I (..\User\module\shoot.h)(0x6968CB81)
I (..\User\bsp\time.h)(0x69707226) I (..\User\bsp\time.h)(0x69707226)
I (D:\Keil_v5\ARM\ARMCLANG\include\string.h)(0x6035A4A8) I (D:\Keil_v5\ARM\ARMCLANG\include\string.h)(0x6035A4A8)
F (..\User\module\cmd\cmd_adapter.c)(0x69710D04)(-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 -O1 -ffunction-sections -Wno-packed -Wno-missing-variable-declarations -Wno-missing-prototypes -Wno-missing-noreturn -Wno-sign-conversion -Wno-nonportable-include-path -Wno-reserved-id-macro -Wno-unused-macros -Wno-documentation-unknown-command -Wno-documentation -Wno-license-management -Wno-parentheses-equality -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 ../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 -I ../User/bsp -I ../User/component -I ../User/device -I ../User/module -I ../User/task -I ../User/module/cmd -I./RTE/_Steering_Wheel_Infatry -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 "steering wheel_infatry/cmd_adapter.o" -MD) F (..\User\module\cmd\cmd_adapter.c)(0x6971A179)(-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 -O1 -ffunction-sections -Wno-packed -Wno-missing-variable-declarations -Wno-missing-prototypes -Wno-missing-noreturn -Wno-sign-conversion -Wno-nonportable-include-path -Wno-reserved-id-macro -Wno-unused-macros -Wno-documentation-unknown-command -Wno-documentation -Wno-license-management -Wno-parentheses-equality -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 ../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 -I ../User/bsp -I ../User/component -I ../User/device -I ../User/module -I ../User/task -I ../User/module/cmd -I./RTE/_Steering_Wheel_Infatry -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 "steering wheel_infatry/cmd_adapter.o" -MD)
I (..\User\module\cmd\cmd_adapter.h)(0x69710143) I (..\User\module\cmd\cmd_adapter.h)(0x69710143)
I (..\User\module\cmd\cmd_types.h)(0x69710063) I (..\User\module\cmd\cmd_types.h)(0x69710063)
I (D:\Keil_v5\ARM\ARMCLANG\include\stdint.h)(0x6035A4A8) I (D:\Keil_v5\ARM\ARMCLANG\include\stdint.h)(0x6035A4A8)

Binary file not shown.

View File

@ -85,6 +85,8 @@ ET16S_SwitchPos_t Keymap(int16_t value) {
int8_t ET16s_ParseRaw( ET16s_t *et16s){ int8_t ET16s_ParseRaw( ET16s_t *et16s){
//ET16s //ET16s
if(et16s==NULL)return ET16s_ERR_NULL;
et16s->header.online = true;
et16s->raw_data.ch[0] = (cbuf[1] | (cbuf[2] << 8)) & 0x07ff; //Channel 1 et16s->raw_data.ch[0] = (cbuf[1] | (cbuf[2] << 8)) & 0x07ff; //Channel 1
et16s->raw_data.ch[3] = ((cbuf[2] >> 3) | (cbuf[3] << 5)) & 0x07ff; //Channel 2 et16s->raw_data.ch[3] = ((cbuf[2] >> 3) | (cbuf[3] << 5)) & 0x07ff; //Channel 2
et16s->raw_data.ch[1] = ((cbuf[3] >> 6) | (cbuf[4] << 2) | //Channel 3 et16s->raw_data.ch[1] = ((cbuf[3] >> 6) | (cbuf[4] << 2) | //Channel 3
@ -109,7 +111,7 @@ int8_t ET16s_ParseRaw( ET16s_t *et16s){
if( et16s->raw_data.ch[1]>-0.01&&et16s->raw_data.ch[1]<=0.01) et16s->raw_data.ch[1]=0; if( et16s->raw_data.ch[1]>-0.01&&et16s->raw_data.ch[1]<=0.01) et16s->raw_data.ch[1]=0;
if( et16s->raw_data.ch[2]>-0.01&&et16s->raw_data.ch[2]<=0.01) et16s->raw_data.ch[2]=0; if( et16s->raw_data.ch[2]>-0.01&&et16s->raw_data.ch[2]<=0.01) et16s->raw_data.ch[2]=0;
if( et16s->raw_data.ch[3]>-0.01&&et16s->raw_data.ch[3]<=0.01) et16s->raw_data.ch[3]=0; if( et16s->raw_data.ch[3]>-0.01&&et16s->raw_data.ch[3]<=0.01) et16s->raw_data.ch[3]=0;
return 1; return ET16s_OK;
} }
@ -164,7 +166,7 @@ int8_t ET16S_ParseRC(ET16s_t *et16s) {
if(et16s->raw_data.sw[6]==1695) if(et16s->raw_data.sw[6]==1695)
{ {
// ET16s_HandleOffline(et16s); // ET16s_HandleOffline(et16s);
// memset(cbuf, 0, sizeof(cbuf)); //有时候会出现消息数组错位,所以直接清空,在离线和指定按键不对的情况下,原数据不可信 memset(cbuf, 0, sizeof(cbuf)); //有时候会出现消息数组错位,所以直接清空,在离线和指定按键不对的情况下,原数据不可信
} }
#endif #endif
return DEVICE_OK; return DEVICE_OK;
@ -173,8 +175,8 @@ int8_t ET16S_ParseRC(ET16s_t *et16s) {
int8_t ET16s_HandleOffline(ET16s_t *rc) { int8_t ET16s_HandleOffline(ET16s_t *rc) {
if (rc == NULL) return DEVICE_ERR_NULL;
if (rc == NULL) return DEVICE_ERR_NULL;
rc->rc_type =Control_loss ; rc->rc_type =Control_loss ;
rc->header.online = false; rc->header.online = false;
memset(&rc->ET16s , 0, sizeof(ET16s_raw_t)); memset(&rc->ET16s , 0, sizeof(ET16s_raw_t));

View File

@ -1,7 +1,7 @@
/* /*
* CMD V2 - * CMD V2 -
*/ */
#include "cmd.h" #include "module/cmd/cmd.h"
#include "bsp/time.h" #include "bsp/time.h"
#include <stdint.h> #include <stdint.h>
#include <string.h> #include <string.h>
@ -69,7 +69,7 @@ static void CMD_RC_BuildShootCmd(CMD_t *ctx) {
} }
/* 根据D拨杆控制射击 */ /* 根据D拨杆控制射击 */
switch (ctx->input.rc.sw[4]) { switch (ctx->input.rc.sw[3]) {
case CMD_SW_DOWN: case CMD_SW_DOWN:
ctx->output.shoot.cmd.ready = true; ctx->output.shoot.cmd.ready = true;
ctx->output.shoot.cmd.firecmd = true; ctx->output.shoot.cmd.firecmd = true;
@ -79,9 +79,11 @@ static void CMD_RC_BuildShootCmd(CMD_t *ctx) {
ctx->output.shoot.cmd.firecmd = false; ctx->output.shoot.cmd.firecmd = false;
break; break;
case CMD_SW_UP: case CMD_SW_UP:
default: ctx->output.shoot.cmd.ready = false;
ctx->output.shoot.cmd.ready = false;
ctx->output.shoot.cmd.firecmd = false; ctx->output.shoot.cmd.firecmd = false;
// default:
// ctx->output.shoot.cmd.ready = false;
// ctx->output.shoot.cmd.firecmd = false;
break; break;
} }
} }

View File

@ -9,6 +9,7 @@
/* ========================================================================== */ /* ========================================================================== */
// static CMD_InputAdapter_t *g_adapters[CMD_SRC_NUM] = {0}; // static CMD_InputAdapter_t *g_adapters[CMD_SRC_NUM] = {0};
CMD_InputAdapter_t *g_adapters[CMD_SRC_NUM] = {0}; CMD_InputAdapter_t *g_adapters[CMD_SRC_NUM] = {0};
/* ========================================================================== */ /* ========================================================================== */
/* DR16 适配器实现 */ /* DR16 适配器实现 */
/* ========================================================================== */ /* ========================================================================== */
@ -145,19 +146,19 @@ int8_t CMD_ET16s_GetInput(void *data, CMD_RawInput_t *output) {
case ET16S_SW_UP: output->rc.sw[0] = CMD_SW_UP; break; case ET16S_SW_UP: output->rc.sw[0] = CMD_SW_UP; break;
case ET16S_SW_MID: output->rc.sw[0] = CMD_SW_MID; break; case ET16S_SW_MID: output->rc.sw[0] = CMD_SW_MID; break;
case ET16S_SW_DOWN: output->rc.sw[0] = CMD_SW_DOWN; break; case ET16S_SW_DOWN: output->rc.sw[0] = CMD_SW_DOWN; break;
default: output->rc.sw[0] = CMD_SW_ERR; break; default: output->rc.sw[0] = CMD_SW_ERR; break;
} }
switch (et16s->ET16s.key_B) { switch (et16s->ET16s.key_B) {
case ET16S_SW_UP: output->rc.sw[1] = CMD_SW_UP; break; case ET16S_SW_UP: output->rc.sw[1] = CMD_SW_UP; break;
case ET16S_SW_MID: output->rc.sw[1] = CMD_SW_MID; break; case ET16S_SW_MID: output->rc.sw[1] = CMD_SW_MID; break;
case ET16S_SW_DOWN: output->rc.sw[1] = CMD_SW_DOWN; break; case ET16S_SW_DOWN: output->rc.sw[1] = CMD_SW_DOWN; break;
default: output->rc.sw[1] = CMD_SW_ERR; break; default: output->rc.sw[1] = CMD_SW_ERR; break;
} }
switch (et16s->ET16s.key_C) { switch (et16s->ET16s.key_C) {
case ET16S_SW_UP: output->rc.sw[2] = CMD_SW_UP; break; case ET16S_SW_UP: output->rc.sw[2] = CMD_SW_UP; break;
case ET16S_SW_MID: output->rc.sw[2] = CMD_SW_MID; break; case ET16S_SW_MID: output->rc.sw[2] = CMD_SW_MID; break;
case ET16S_SW_DOWN: output->rc.sw[2] = CMD_SW_DOWN; break; case ET16S_SW_DOWN: output->rc.sw[2] = CMD_SW_DOWN; break;
default: output->rc.sw[2] = CMD_SW_ERR; break; default: output->rc.sw[2] = CMD_SW_ERR; break;
} }
switch (et16s->ET16s.key_D) { switch (et16s->ET16s.key_D) {
case ET16S_SW_UP: output->rc.sw[3] = CMD_SW_UP; break; case ET16S_SW_UP: output->rc.sw[3] = CMD_SW_UP; break;
@ -169,13 +170,13 @@ int8_t CMD_ET16s_GetInput(void *data, CMD_RawInput_t *output) {
case ET16S_SW_UP: output->rc.sw[4] = CMD_SW_UP; break; case ET16S_SW_UP: output->rc.sw[4] = CMD_SW_UP; break;
case ET16S_SW_MID: output->rc.sw[4] = CMD_SW_MID; break; case ET16S_SW_MID: output->rc.sw[4] = CMD_SW_MID; break;
case ET16S_SW_DOWN: output->rc.sw[4] = CMD_SW_DOWN; break; case ET16S_SW_DOWN: output->rc.sw[4] = CMD_SW_DOWN; break;
default: output->rc.sw[4] = CMD_SW_ERR; break; // default: output->rc.sw[4] = CMD_SW_ERR; break;
} }
switch (et16s->ET16s.key_F) { switch (et16s->ET16s.key_F) {
case ET16S_SW_UP: output->rc.sw[5] = CMD_SW_UP; break; case ET16S_SW_UP: output->rc.sw[5] = CMD_SW_UP; break;
case ET16S_SW_MID: output->rc.sw[5] = CMD_SW_MID; break; case ET16S_SW_MID: output->rc.sw[5] = CMD_SW_MID; break;
case ET16S_SW_DOWN: output->rc.sw[5] = CMD_SW_DOWN; break; case ET16S_SW_DOWN: output->rc.sw[5] = CMD_SW_DOWN; break;
default: output->rc.sw[5] = CMD_SW_ERR; break; default: output->rc.sw[5] = CMD_SW_ERR; break;
} }
switch (et16s->ET16s.key_G) { switch (et16s->ET16s.key_G) {
case ET16S_SW_UP: output->rc.sw[6] = CMD_SW_UP; break; case ET16S_SW_UP: output->rc.sw[6] = CMD_SW_UP; break;

View File

@ -340,11 +340,11 @@ Config_RobotParam_t robot_config = {
.rc_mode_map = { .rc_mode_map = {
.sw_left_up = CHASSIS_MODE_RELAX, .sw_left_up = CHASSIS_MODE_RELAX,
.sw_left_mid = CHASSIS_MODE_FOLLOW_GIMBAL, .sw_left_mid = CHASSIS_MODE_FOLLOW_GIMBAL,
.sw_left_down = CHASSIS_MODE_RELAX, .sw_left_down = CHASSIS_MODE_ROTOR,
.gimbal_sw_up = GIMBAL_MODE_ABSOLUTE, .gimbal_sw_up = GIMBAL_MODE_RELAX,
.gimbal_sw_mid = GIMBAL_MODE_RELATIVE, .gimbal_sw_mid = GIMBAL_MODE_ABSOLUTE,
.gimbal_sw_down = GIMBAL_MODE_ABSOLUTE, .gimbal_sw_down = GIMBAL_MODE_RELATIVE,
.shoot_sw_up = SHOOT_MODE_SAFE, .shoot_sw_up = SHOOT_MODE_SAFE,
.shoot_sw_mid = SHOOT_MODE_SINGLE, .shoot_sw_mid = SHOOT_MODE_SINGLE,

View File

@ -64,9 +64,7 @@ void Task_cmd(void *argument) {
osMessageQueueGet(task_runtime.msgq.rc.et16s, &cmd_et16s, NULL, 0); osMessageQueueGet(task_runtime.msgq.rc.et16s, &cmd_et16s, NULL, 0);
#endif #endif
CMD_UpdateInput(&cmd);
CMD_Arbitrate(&cmd);
CMD_GenerateCommands(&cmd);
CMD_Update(&cmd); CMD_Update(&cmd);
/* 获取命令发送到各模块 */ /* 获取命令发送到各模块 */
cmd_for_chassis = CMD_GetChassisCmd(&cmd); cmd_for_chassis = CMD_GetChassisCmd(&cmd);