generated from Template/H563ZI-HAL-CMake-Template
gps parse successful
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -225,6 +225,11 @@
|
|||||||
<WinNumber>1</WinNumber>
|
<WinNumber>1</WinNumber>
|
||||||
<ItemText>isNewData</ItemText>
|
<ItemText>isNewData</ItemText>
|
||||||
</Ww>
|
</Ww>
|
||||||
|
<Ww>
|
||||||
|
<count>15</count>
|
||||||
|
<WinNumber>1</WinNumber>
|
||||||
|
<ItemText>current_location</ItemText>
|
||||||
|
</Ww>
|
||||||
</WatchWindow1>
|
</WatchWindow1>
|
||||||
<WatchWindow2>
|
<WatchWindow2>
|
||||||
<Ww>
|
<Ww>
|
||||||
@@ -257,6 +262,11 @@
|
|||||||
<WinNumber>2</WinNumber>
|
<WinNumber>2</WinNumber>
|
||||||
<ItemText>GPS_DMA_RX_BUF[GPS_DMA_RX_BUF_LEN]</ItemText>
|
<ItemText>GPS_DMA_RX_BUF[GPS_DMA_RX_BUF_LEN]</ItemText>
|
||||||
</Ww>
|
</Ww>
|
||||||
|
<Ww>
|
||||||
|
<count>6</count>
|
||||||
|
<WinNumber>2</WinNumber>
|
||||||
|
<ItemText>msg</ItemText>
|
||||||
|
</Ww>
|
||||||
</WatchWindow2>
|
</WatchWindow2>
|
||||||
<Tracepoint>
|
<Tracepoint>
|
||||||
<THDelay>0</THDelay>
|
<THDelay>0</THDelay>
|
||||||
|
|||||||
Binary file not shown.
@@ -27,14 +27,14 @@ Project File Date: 07/01/2025
|
|||||||
<h2>Output:</h2>
|
<h2>Output:</h2>
|
||||||
*** Using Compiler 'V6.21', folder: 'D:\keil5\ARM\ARMCLANG\Bin'
|
*** Using Compiler 'V6.21', folder: 'D:\keil5\ARM\ARMCLANG\Bin'
|
||||||
Build target 'AutoGuideStick'
|
Build target 'AutoGuideStick'
|
||||||
compiling gps.c...
|
compiling imu948.c...
|
||||||
../fun/HCBle.c(140): warning: illegal character encoding in string literal [-Winvalid-source-encoding]
|
../fun/HCBle.c(138): warning: illegal character encoding in string literal [-Winvalid-source-encoding]
|
||||||
140 | HCBle_SendData("? <BD><E2><CE><F6>ʧ<B0><DC>: %s\r\n", frame);
|
138 | HCBle_SendData("? <BD><E2><CE><F6>ʧ<B0><DC>: %s\r\n", frame);
|
||||||
| ^~~~~~~~~~~~~~~~ ~~~~~~~~
|
| ^~~~~~~~~~~~~~~~ ~~~~~~~~
|
||||||
1 warning generated.
|
1 warning generated.
|
||||||
compiling HCBle.c...
|
compiling HCBle.c...
|
||||||
linking...
|
linking...
|
||||||
Program Size: Code=83580 RO-data=1428 RW-data=20 ZI-data=15532
|
Program Size: Code=83396 RO-data=1364 RW-data=20 ZI-data=15268
|
||||||
FromELF: creating hex file...
|
FromELF: creating hex file...
|
||||||
"AutoGuideStick\AutoGuideStick.axf" - 0 Error(s), 1 Warning(s).
|
"AutoGuideStick\AutoGuideStick.axf" - 0 Error(s), 1 Warning(s).
|
||||||
|
|
||||||
@@ -60,7 +60,7 @@ Package Vendor: Keil
|
|||||||
|
|
||||||
* Component: ARM::CMSIS:CORE@5.6.0
|
* Component: ARM::CMSIS:CORE@5.6.0
|
||||||
Include file: CMSIS/Core/Include/tz_context.h
|
Include file: CMSIS/Core/Include/tz_context.h
|
||||||
Build Time Elapsed: 00:00:02
|
Build Time Elapsed: 00:00:01
|
||||||
</pre>
|
</pre>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -2074,7 +2074,7 @@ I (..\Middlewares\ST\threadx\ports\cortex_m33\ac6\inc\tx_port.h)(0x683FA4D9)
|
|||||||
|
|
||||||
-o autoguidestick/tx_event_flags_info_get.o -MD)
|
-o autoguidestick/tx_event_flags_info_get.o -MD)
|
||||||
I (..\Middlewares\ST\threadx\common\inc\tx_api.h)(0x683FA4DA)
|
I (..\Middlewares\ST\threadx\common\inc\tx_api.h)(0x683FA4DA)
|
||||||
I (..\Middlewares\ST\threadx\ports\cortex_m33\ac6\inc\tx_port.h)(0x683FA4D9)
|
I (..\Middlewares\ST\threadx\ports\cortex_m33\ac6\inc\tx_port.h)(0x683FA4D9)
|
||||||
I (..\Core\Inc\tx_user.he:\keil5\ARM\ARMCLANG\include\stdlib.h)(0x00000000)
|
I (..\Core\Inc\tx_user.he:\keil5\ARM\ARMCLANG\include\stdlib.h)(0x00000000)
|
||||||
I (D:\keil5\ARM\ARMCLANG\include\string.h)(0x6569B012)
|
I (D:\keil5\ARM\ARMCLANG\include\string.h)(0x6569B012)
|
||||||
I (..\Middlewares\ST\threadx\common\inc\tx_trace.h)(0x683FA4DA)
|
I (..\Middlewares\ST\threadx\common\inc\tx_trace.h)(0x683FA4DA)
|
||||||
@@ -2118,7 +2118,7 @@ I (..\fun\Shake_Motor.hG.\fun\Ultrasound.h..\fun\Buzzer.h)(0x00000000)
|
|||||||
I (..\Middlewares\ST\threadx\ports\cortex_m33\ac6\inc\tx_port.h)(0x683FA4D9)
|
I (..\Middlewares\ST\threadx\ports\cortex_m33\ac6\inc\tx_port.h)(0x683FA4D9)
|
||||||
I (..\Core\Inc\tx_user.he:\keil5\ARM\ARMCLANG\include\stdlib.h)(0x00000000)
|
I (..\Core\Inc\tx_user.he:\keil5\ARM\ARMCLANG\include\stdlib.h)(0x00000000)
|
||||||
I (D:\keil5\ARM\ARMCLANG\include\string.h)(0x6569B012)
|
I (D:\keil5\ARM\ARMCLANG\include\string.h)(0x6569B012)
|
||||||
I (..\Middlewares\ST\threadx\common\inc\tx_trace.h)(0x683FA4DA)
|
I (..\Middlewares\ST\threadx\common\inc\tx_trace.h)(0x683FA4DA)
|
||||||
I (..\Middlewares\ST\threadx\common\inc\tx_thread.h)(0x683FA4DA)
|
I (..\Middlewares\ST\threadx\common\inc\tx_thread.h)(0x683FA4DA)
|
||||||
I (..\Middlewares\ST\threadx\common\inc\tx_event_flags.h)(0x683FA4DA)
|
I (..\Middlewares\ST\threadx\common\inc\tx_event_flags.h)(0x683FA4DA)
|
||||||
F (../Middlewares/ST/threadx/common/src/tx_event_flags_set_notify.c)(0x683FA4DA)(-xc -std=c11 --target=arm-arm-none-eabi -mcpu=cortex-m33 -mfpu=fpv5-sp-d16 -mfloat-abi=hard -c
|
F (../Middlewares/ST/threadx/common/src/tx_event_flags_set_notify.c)(0x683FA4DA)(-xc -std=c11 --target=arm-arm-none-eabi -mcpu=cortex-m33 -mfpu=fpv5-sp-d16 -mfloat-abi=hard -c
|
||||||
@@ -2379,7 +2379,7 @@ I (D:\keil5\ARM\ARMCLANG\include\stdarg.h)(0x6569B012)
|
|||||||
I (..\Middlewares\ST\threadx\common\inc\tx_queue.h)(0x683FA4DA)
|
I (..\Middlewares\ST\threadx\common\inc\tx_queue.h)(0x683FA4DA)
|
||||||
F (../Middlewares/ST/threadx/common/src/tx_queue_delete.c)(0x683FA4DA)(-xc -std=c11 --target=arm-arm-none-eabi -mcpu=cortex-m33 -mfpu=fpv5-sp-d16 -mfloat-abi=hard -c
|
F (../Middlewares/ST/threadx/common/src/tx_queue_delete.c)(0x683FA4DA)(-xc -std=c11 --target=arm-arm-none-eabi -mcpu=cortex-m33 -mfpu=fpv5-sp-d16 -mfloat-abi=hard -c
|
||||||
|
|
||||||
-fno-rtti -funsigned-char -fshort-enums -fshort-wchar
|
-fno-rtti -funsigned-char -fshort-enums -fshort-wchar
|
||||||
|
|
||||||
-D__MICROLIB -gdwarf-4 -O0 -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 -Wno-reserved-identifier -I ../Core/Inc -I ../AZURE_RTOS/App -I ../Drivers/STM32H5xx_HAL_Driver/Inc -I ../Drivers/STM32H5xx_HAL_Driver/Inc/Legacy -I ../Middlewares/ST/threadx/common/inc -I ../Drivers/CMSIS/Device/ST/STM32H5xx/Include -I ../Middlewares/ST/threadx/ports/cortex_m33/ac6/inc -I ../Drivers/CMSIS/Include -I ../fun
|
-D__MICROLIB -gdwarf-4 -O0 -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 -Wno-reserved-identifier -I ../Core/Inc -I ../AZURE_RTOS/App -I ../Drivers/STM32H5xx_HAL_Driver/Inc -I ../Drivers/STM32H5xx_HAL_Driver/Inc/Legacy -I ../Middlewares/ST/threadx/common/inc -I ../Drivers/CMSIS/Device/ST/STM32H5xx/Include -I ../Middlewares/ST/threadx/ports/cortex_m33/ac6/inc -I ../Drivers/CMSIS/Include -I ../fun
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
14
fun/HCBle.c
14
fun/HCBle.c
@@ -104,14 +104,12 @@ void HAL_UARTEx_RxEventCallback(UART_HandleTypeDef *huart, uint16_t Size)
|
|||||||
{
|
{
|
||||||
|
|
||||||
// // <20><><EFBFBD><EFBFBD> Size <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>յ<EFBFBD><D5B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
// // <20><><EFBFBD><EFBFBD> Size <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>յ<EFBFBD><D5B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
// memcpy(GPS.GPS_Buffer,GPS_DMA_RX_BUF,Size);
|
memcpy(GPS.GPS_Buffer,GPS_DMA_RX_BUF,Size);
|
||||||
// GPS.GPS_Buffer[Size] = '\0';
|
GPS.GPS_Buffer[Size] = '\0';
|
||||||
// GPS.isGetData = 1; //<2F><><EFBFBD>ݽ<EFBFBD><DDBD>ձ<EFBFBD>־λ<D6BE><CEBB>Ϊ1
|
GPS.isGetData = 1; //<2F><><EFBFBD>ݽ<EFBFBD><DDBD>ձ<EFBFBD>־λ<D6BE><CEBB>Ϊ1
|
||||||
//
|
|
||||||
// tx_event_flags_set(&system_events, EVENT_GPS_DATA_READY, TX_OR);
|
tx_event_flags_set(&system_events, EVENT_GPS_DATA_READY, TX_OR);
|
||||||
for (uint16_t i = 0; i < Size; ++i) { /* <20><><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>л<EFBFBD><D0BB><EFBFBD> */
|
|
||||||
GPS_LinePush(GPS_DMA_RX_BUF[i]);
|
|
||||||
}
|
|
||||||
//<2F><><EFBFBD>¿<EFBFBD><C2BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
//<2F><><EFBFBD>¿<EFBFBD><C2BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
HAL_UARTEx_ReceiveToIdle_IT(&huart2,GPS_DMA_RX_BUF,GPS_DMA_RX_BUF_LEN);
|
HAL_UARTEx_ReceiveToIdle_IT(&huart2,GPS_DMA_RX_BUF,GPS_DMA_RX_BUF_LEN);
|
||||||
// HAL_UARTEx_ReceiveToIdle_DMA(&huart2,GPS_DMA_RX_BUF,GPS_DMA_RX_BUF_LEN);
|
// HAL_UARTEx_ReceiveToIdle_DMA(&huart2,GPS_DMA_RX_BUF,GPS_DMA_RX_BUF_LEN);
|
||||||
|
|||||||
21
fun/gps.c
21
fun/gps.c
@@ -167,16 +167,25 @@ static uint16_t line_w = 0;
|
|||||||
|
|
||||||
void GPS_LinePush(uint8_t ch)
|
void GPS_LinePush(uint8_t ch)
|
||||||
{
|
{
|
||||||
if (ch == '\n') { /* һ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
if (ch == '\n') { /* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>н<EFBFBD><EFBFBD><EFBFBD> */
|
||||||
line_buf[line_w] = '\0';
|
line_buf[line_w] = '\0';
|
||||||
strncpy(GPS.GPS_Buffer, line_buf, GPS_Buffer_Length);
|
|
||||||
|
|
||||||
|
/* A. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> '$' <20><>ͷ<EFBFBD><CDB7>˵<EFBFBD><CBB5><EFBFBD><EFBFBD>ֻ<EFBFBD><D6BB><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD>ĺ<EFBFBD><C4BA><EFBFBD><EFBFBD><EFBFBD> <20><> ֱ<><D6B1>ƴ<EFBFBD><C6B4> */
|
||||||
|
if (line_buf[0] != '$' && GPS.isGetData == 0 && GPS.GPS_Buffer[0] == '$')
|
||||||
|
{
|
||||||
|
strncat(GPS.GPS_Buffer, line_buf, GPS_Buffer_Length - strlen(GPS.GPS_Buffer) - 1);
|
||||||
|
}
|
||||||
|
else /* B. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¾<EFBFBD> */
|
||||||
|
{
|
||||||
|
strncpy(GPS.GPS_Buffer, line_buf, GPS_Buffer_Length);
|
||||||
|
}
|
||||||
|
|
||||||
line_w = 0;
|
line_w = 0;
|
||||||
GPS.isGetData = 1;
|
GPS.isGetData = 1;
|
||||||
tx_event_flags_set(&system_events, EVENT_GPS_DATA_READY, TX_OR);
|
tx_event_flags_set(&system_events, EVENT_GPS_DATA_READY, TX_OR);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (line_w < GPS_Buffer_Length - 1)
|
|
||||||
line_buf[line_w++] = ch; /* <20><>ͨ<EFBFBD>ַ<EFBFBD> */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* === <20><> <20>½<EFBFBD><C2BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֻҪ<D6BB><D2AA>γ<EFBFBD><CEB3> === */
|
/* === <20><> <20>½<EFBFBD><C2BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֻҪ<D6BB><D2AA>γ<EFBFBD><CEB3> === */
|
||||||
@@ -331,8 +340,8 @@ void gps_thread_entry(ULONG thread_input)
|
|||||||
tx_event_flags_get(&system_events, EVENT_GPS_DATA_READY, TX_OR_CLEAR, &events, TX_WAIT_FOREVER);
|
tx_event_flags_get(&system_events, EVENT_GPS_DATA_READY, TX_OR_CLEAR, &events, TX_WAIT_FOREVER);
|
||||||
|
|
||||||
parseGpsBuffer();
|
parseGpsBuffer();
|
||||||
HCBle_SendData("[GPS] isGetData=%d, isParseData=%d, isUsefull=%d, Buffer=%s\r\n",
|
// HCBle_SendData("[GPS] isGetData=%d, isParseData=%d, isUsefull=%d, Buffer=%s\r\n",
|
||||||
GPS.isGetData, GPS.isParseData, GPS.isUsefull, GPS.GPS_Buffer);
|
// GPS.isGetData, GPS.isParseData, GPS.isUsefull, GPS.GPS_Buffer);
|
||||||
if (GPS.isParseData && GPS.isUsefull)
|
if (GPS.isParseData && GPS.isUsefull)
|
||||||
{
|
{
|
||||||
current_location.lat = Convert_to_degrees(GPS.latitude);
|
current_location.lat = Convert_to_degrees(GPS.latitude);
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ extern TX_QUEUE im948_uart_rx_queue;
|
|||||||
void imu_angle_ble_task_entry(ULONG thread_input)
|
void imu_angle_ble_task_entry(ULONG thread_input)
|
||||||
{
|
{
|
||||||
ULONG rx_data;
|
ULONG rx_data;
|
||||||
|
BleMessage msg;
|
||||||
// <20><>ʼ<EFBFBD><CABC>ģ<EFBFBD><C4A3>
|
// <20><>ʼ<EFBFBD><CABC>ģ<EFBFBD><C4A3>
|
||||||
// IM948_Init();
|
// IM948_Init();
|
||||||
// HCBle_SendData("halo");
|
// HCBle_SendData("halo");
|
||||||
@@ -83,12 +83,11 @@ void imu_angle_ble_task_entry(ULONG thread_input)
|
|||||||
isNewData = 0;
|
isNewData = 0;
|
||||||
|
|
||||||
float angle = AngleZ * 0.0054931640625f;
|
float angle = AngleZ * 0.0054931640625f;
|
||||||
|
// msg.angle = AngleZ * 0.0054931640625f;
|
||||||
|
// tx_queue_send(&ble_tx_queue, &msg, TX_WAIT_FOREVER);
|
||||||
// HCBle_SendData("Z:%.2f\r\n",AngleZ);
|
// HCBle_SendData("Z:%.2f\r\n",AngleZ);
|
||||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>angle<6C><65>ä<EFBFBD>ȳ<EFBFBD><C8B3><EFBFBD><EFBFBD>ж<EFBFBD>
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>angle<6C><65>ä<EFBFBD>ȳ<EFBFBD><C8B3><EFBFBD><EFBFBD>ж<EFBFBD>
|
||||||
// <20><><EFBFBD><EFBFBD>:
|
|
||||||
if(angle > 30.0f) {
|
|
||||||
// <20><><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user