gps parse successful

This commit is contained in:
2025-07-01 22:12:49 +08:00
parent 69d790d5e2
commit a6ebf4b8a5
14 changed files with 7146 additions and 7193 deletions

File diff suppressed because one or more lines are too long

View File

@@ -225,6 +225,11 @@
<WinNumber>1</WinNumber>
<ItemText>isNewData</ItemText>
</Ww>
<Ww>
<count>15</count>
<WinNumber>1</WinNumber>
<ItemText>current_location</ItemText>
</Ww>
</WatchWindow1>
<WatchWindow2>
<Ww>
@@ -257,6 +262,11 @@
<WinNumber>2</WinNumber>
<ItemText>GPS_DMA_RX_BUF[GPS_DMA_RX_BUF_LEN]</ItemText>
</Ww>
<Ww>
<count>6</count>
<WinNumber>2</WinNumber>
<ItemText>msg</ItemText>
</Ww>
</WatchWindow2>
<Tracepoint>
<THDelay>0</THDelay>

View File

@@ -27,14 +27,14 @@ Project File Date: 07/01/2025
<h2>Output:</h2>
*** Using Compiler 'V6.21', folder: 'D:\keil5\ARM\ARMCLANG\Bin'
Build target 'AutoGuideStick'
compiling gps.c...
../fun/HCBle.c(140): warning: illegal character encoding in string literal [-Winvalid-source-encoding]
140 | HCBle_SendData("? <BD><E2><CE><F6>ʧ<B0><DC>: %s\r\n", frame);
compiling imu948.c...
../fun/HCBle.c(138): warning: illegal character encoding in string literal [-Winvalid-source-encoding]
138 | HCBle_SendData("? <BD><E2><CE><F6>ʧ<B0><DC>: %s\r\n", frame);
| ^~~~~~~~~~~~~~~~ ~~~~~~~~
1 warning generated.
compiling HCBle.c...
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...
"AutoGuideStick\AutoGuideStick.axf" - 0 Error(s), 1 Warning(s).
@@ -60,7 +60,7 @@ Package Vendor: Keil
* Component: ARM::CMSIS:CORE@5.6.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

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -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)
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 (D:\keil5\ARM\ARMCLANG\include\string.h)(0x6569B012)
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 (..\Core\Inc\tx_user.he:\keil5\ARM\ARMCLANG\include\stdlib.h)(0x00000000)
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_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
@@ -2379,7 +2379,7 @@ I (D:\keil5\ARM\ARMCLANG\include\stdarg.h)(0x6569B012)
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
-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

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -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>
// memcpy(GPS.GPS_Buffer,GPS_DMA_RX_BUF,Size);
// GPS.GPS_Buffer[Size] = '\0';
// GPS.isGetData = 1; //<2F><><EFBFBD>ݽ<EFBFBD><DDBD>ձ<EFBFBD>־λ<D6BE><CEBB>Ϊ1
//
// 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]);
}
memcpy(GPS.GPS_Buffer,GPS_DMA_RX_BUF,Size);
GPS.GPS_Buffer[Size] = '\0';
GPS.isGetData = 1; //<2F><><EFBFBD>ݽ<EFBFBD><DDBD>ձ<EFBFBD>־λ<D6BE><CEBB>Ϊ1
tx_event_flags_set(&system_events, EVENT_GPS_DATA_READY, TX_OR);
//<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_DMA(&huart2,GPS_DMA_RX_BUF,GPS_DMA_RX_BUF_LEN);

View File

@@ -167,16 +167,25 @@ static uint16_t line_w = 0;
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';
/* 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;
GPS.isGetData = 1;
tx_event_flags_set(&system_events, EVENT_GPS_DATA_READY, TX_OR);
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> === */
@@ -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);
parseGpsBuffer();
HCBle_SendData("[GPS] isGetData=%d, isParseData=%d, isUsefull=%d, Buffer=%s\r\n",
GPS.isGetData, GPS.isParseData, GPS.isUsefull, GPS.GPS_Buffer);
// HCBle_SendData("[GPS] isGetData=%d, isParseData=%d, isUsefull=%d, Buffer=%s\r\n",
// GPS.isGetData, GPS.isParseData, GPS.isUsefull, GPS.GPS_Buffer);
if (GPS.isParseData && GPS.isUsefull)
{
current_location.lat = Convert_to_degrees(GPS.latitude);

View File

@@ -65,7 +65,7 @@ extern TX_QUEUE im948_uart_rx_queue;
void imu_angle_ble_task_entry(ULONG thread_input)
{
ULONG rx_data;
BleMessage msg;
// <20><>ʼ<EFBFBD><CABC>ģ<EFBFBD><C4A3>
// IM948_Init();
// HCBle_SendData("halo");
@@ -83,12 +83,11 @@ void imu_angle_ble_task_entry(ULONG thread_input)
isNewData = 0;
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);
// <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>
}
}
}
}