遥控器遥感中点正常
This commit is contained in:
parent
7dc0a28994
commit
411fcb5f5c
File diff suppressed because one or more lines are too long
@ -163,32 +163,12 @@
|
||||
<Ww>
|
||||
<count>0</count>
|
||||
<WinNumber>1</WinNumber>
|
||||
<ItemText>et16s,0x0A</ItemText>
|
||||
<ItemText>cbuf</ItemText>
|
||||
</Ww>
|
||||
<Ww>
|
||||
<count>1</count>
|
||||
<WinNumber>1</WinNumber>
|
||||
<ItemText>cmd,0x0A</ItemText>
|
||||
</Ww>
|
||||
<Ww>
|
||||
<count>2</count>
|
||||
<WinNumber>1</WinNumber>
|
||||
<ItemText>cmd_et16s</ItemText>
|
||||
</Ww>
|
||||
<Ww>
|
||||
<count>3</count>
|
||||
<WinNumber>1</WinNumber>
|
||||
<ItemText>cmd_for_gimbal</ItemText>
|
||||
</Ww>
|
||||
<Ww>
|
||||
<count>4</count>
|
||||
<WinNumber>1</WinNumber>
|
||||
<ItemText>cmd_for_chassis</ItemText>
|
||||
</Ww>
|
||||
<Ww>
|
||||
<count>5</count>
|
||||
<WinNumber>1</WinNumber>
|
||||
<ItemText>cmd_for_shoot</ItemText>
|
||||
<ItemText>et16s,0x0A</ItemText>
|
||||
</Ww>
|
||||
</WatchWindow1>
|
||||
<Tracepoint>
|
||||
@ -1093,7 +1073,7 @@
|
||||
|
||||
<Group>
|
||||
<GroupName>device</GroupName>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExp>1</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<cbSel>0</cbSel>
|
||||
<RteFlg>0</RteFlg>
|
||||
@ -1301,7 +1281,7 @@
|
||||
|
||||
<Group>
|
||||
<GroupName>task</GroupName>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExp>1</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<cbSel>0</cbSel>
|
||||
<RteFlg>0</RteFlg>
|
||||
@ -1441,7 +1421,7 @@
|
||||
|
||||
<Group>
|
||||
<GroupName>cmd</GroupName>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExp>1</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<cbSel>0</cbSel>
|
||||
<RteFlg>0</RteFlg>
|
||||
|
||||
Binary file not shown.
@ -60,7 +60,7 @@ Package Vendor: Keil
|
||||
|
||||
* Component: ARM::CMSIS:CORE:5.4.0
|
||||
Include file: CMSIS\Core\Include\tz_context.h
|
||||
Build Time Elapsed: 00:00:02
|
||||
Build Time Elapsed: 00:00:01
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -3,7 +3,7 @@
|
||||
<title>Static Call Graph - [Steering Wheel_Infatry\Steering Wheel_Infatry.axf]</title></head>
|
||||
<body><HR>
|
||||
<H1>Static Call Graph for image Steering Wheel_Infatry\Steering Wheel_Infatry.axf</H1><HR>
|
||||
<BR><P>#<CALLGRAPH># ARM Linker, 6160001: Last Updated: Thu Jan 22 12:03:07 2026
|
||||
<BR><P>#<CALLGRAPH># ARM Linker, 6160001: Last Updated: Thu Jan 22 16:18:26 2026
|
||||
<BR><P>
|
||||
<H3>Maximum Stack Usage = 328 bytes + Unknown(Functions without stacksize, Cycles, Untraceable Function Pointers)</H3><H3>
|
||||
Call chain for Maximum Stack Depth:</H3>
|
||||
@ -1379,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))
|
||||
<BR>[Address Reference Count : 1]<UL><LI> startup_stm32f407xx.o(RESET)
|
||||
</UL>
|
||||
<P><STRONG><a name="[133]"></a>ET16S_ParseRC</STRONG> (Thumb, 174 bytes, Stack size 16 bytes, et16s.o(.text.ET16S_ParseRC))
|
||||
<P><STRONG><a name="[133]"></a>ET16S_ParseRC</STRONG> (Thumb, 146 bytes, Stack size 16 bytes, et16s.o(.text.ET16S_ParseRC))
|
||||
<BR><BR>[Stack]<UL><LI>Max Depth = 96<LI>Call Chain = ET16S_ParseRC ⇒ ET16s_ParseRaw ⇒ __aeabi_f2d
|
||||
</UL>
|
||||
<BR>[Calls]<UL><LI><a href="#[135]">>></a> Keymap
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -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\bsp\uart.h)(0x69707226)
|
||||
I (..\Core\Inc\usart.h)(0x69455093)
|
||||
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)
|
||||
F (..\User\device\ET16s.c)(0x6971DD50)(-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\device.h)(0x69707226)
|
||||
I (D:\Keil_v5\ARM\ARMCLANG\include\stdbool.h)(0x6035A4A8)
|
||||
|
||||
Binary file not shown.
@ -102,10 +102,19 @@ int8_t ET16s_ParseRaw( ET16s_t *et16s){
|
||||
et16s->raw_data.sw[1] = ((int16_t)cbuf[14] >> 6 | ((int16_t)cbuf[15] << 2 ) | (int16_t)cbuf[16] << 10 ) & 0x07FF; //Channel 11
|
||||
et16s->raw_data.sw[7] = ((int16_t)cbuf[16] >> 1 | ((int16_t)cbuf[17] << 7 )) & 0x07FF;
|
||||
|
||||
et16s->raw_data.sw[6] = ((int16_t)cbuf[6] >> 4 | ((int16_t)cbuf[7] << 4 )) & 0x07FF; //Channel 5
|
||||
et16s->raw_data.sw[0] = ((int16_t)cbuf[7] >> 7 | ((int16_t)cbuf[8] << 1 ) | (int16_t)cbuf[9] << 9 ) & 0x07FF; //Channel 6
|
||||
et16s->raw_data.sw[5] = ((int16_t)cbuf[9] >> 2 | ((int16_t)cbuf[10] << 6 )) & 0x07FF;; //Channel 7
|
||||
et16s->raw_data.sw[4] = ((int16_t)cbuf[10] >> 5 | ((int16_t)cbuf[11] << 3 )) & 0x07FF; //Channel 8
|
||||
et16s->raw_data.sw[3] = ((int16_t)cbuf[12] << 0 | ((int16_t)cbuf[13] << 8 )) & 0x07FF; //Channel 9
|
||||
et16s->raw_data.sw[2] = ((int16_t)cbuf[13] >> 3 | ((int16_t)cbuf[14] << 5 )) & 0x07FF; //Channel 10
|
||||
et16s->raw_data.sw[1] = ((int16_t)cbuf[14] >> 6 | ((int16_t)cbuf[15] << 2 ) | (int16_t)cbuf[16] << 10 ) & 0x07FF; //Channel 11
|
||||
et16s->raw_data.sw[7] = ((int16_t)cbuf[16] >> 1 | ((int16_t)cbuf[17] << 7 )) & 0x07FF;
|
||||
|
||||
et16s->raw_data.ch[1] = map_fp32( et16s->raw_data.ch[1],353,1695,-1,1); //lx
|
||||
et16s->raw_data.ch[0] = map_fp32( et16s->raw_data.ch[0],353,1695,-1,1); //ly
|
||||
et16s->raw_data.ch[2] = map_fp32( et16s->raw_data.ch[2],353,1695,-1,1); //rx
|
||||
et16s->raw_data.ch[3] = map_fp32( et16s->raw_data.ch[3],353,1695,-1,1); //ry
|
||||
et16s->raw_data.ch[3] = map_fp32( et16s->raw_data.ch[3],353,1695,-1,1); //ry
|
||||
|
||||
if( et16s->raw_data.ch[0]>-0.01&&et16s->raw_data.ch[0]<=0.01) et16s->raw_data.ch[0]=0;
|
||||
if( et16s->raw_data.ch[1]>-0.01&&et16s->raw_data.ch[1]<=0.01) et16s->raw_data.ch[1]=0;
|
||||
@ -162,11 +171,11 @@ int8_t ET16S_ParseRC(ET16s_t *et16s) {
|
||||
et16s->ET16s.key_H = Keymap(et16s->raw_data.sw[7]);
|
||||
// rc->ET16s.knob_left = ET16s->sw[7]; //200 330 479 629 778 928 1075 1224 1373 1522 1670 1800
|
||||
|
||||
// /*离线处理,和dr16位置不同*/
|
||||
/*离线处理,和dr16位置不同*/
|
||||
if(et16s->raw_data.sw[6]==1695)
|
||||
{
|
||||
// ET16s_HandleOffline(et16s);
|
||||
memset(cbuf, 0, sizeof(cbuf)); //有时候会出现消息数组错位,所以直接清空,在离线和指定按键不对的情况下,原数据不可信
|
||||
// memset(cbuf, 0, sizeof(cbuf)); //有时候会出现消息数组错位,所以直接清空,在离线和指定按键不对的情况下,原数据不可信
|
||||
}
|
||||
#endif
|
||||
return DEVICE_OK;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user