| | |
| | | I (include\drivers\mk_io.h)(0x680D9C68)
|
| | | F (.\sn74hc595.h)(0x680D9C68)()
|
| | | F (.\mk_4G.h)(0x680D9C68)()
|
| | | F (.\include\drivers\PCA9555.c)(0x681D68D7)(-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m0 -c
-fno-rtti -funsigned-char
-D__MICROLIB -gdwarf-3 -O3 -ffunction-sections -w -I ./include/drivers -I .. -I ./include/board -I ./include/CMSIS/Include -I ./include/components/algo/inc -I ./include/components/crc -I ./include/components/libc -I ./include/components/wsf/include -I ./include/components/wsf/include/platform -I ./include/devices/MK800X/Include -I ./include/drivers -I ./include/components/hido/Include -I ./include/components/internet/inc -I ./include/components/hal -I ../keil -I ./include/src -I ./include/components/internet/src -Wno-declaration-after-statement -Wno-double-promotion -Wno-extra-semi-stmt -Wno-gnu-zero-variadic-macro-arguments -Wno-padded -Wno-unused-parameter
-I./RTE/_MK8000_Release
-ID:/keil/pack/MKSEMI/MK800X_DFP/1.0.3/Device/Include
-ID:/keil/ARM/CMSIS/Include
-D__UVISION_VERSION="530" -D_RTE_ -DUWB_EN -DSTD_LIBC
-o ./objects/pca9555.o -MD)
|
| | | F (.\include\drivers\PCA9555.c)(0x68230036)(-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m0 -c
-fno-rtti -funsigned-char
-D__MICROLIB -gdwarf-3 -O3 -ffunction-sections -w -I ./include/drivers -I .. -I ./include/board -I ./include/CMSIS/Include -I ./include/components/algo/inc -I ./include/components/crc -I ./include/components/libc -I ./include/components/wsf/include -I ./include/components/wsf/include/platform -I ./include/devices/MK800X/Include -I ./include/drivers -I ./include/components/hido/Include -I ./include/components/internet/inc -I ./include/components/hal -I ../keil -I ./include/src -I ./include/components/internet/src -Wno-declaration-after-statement -Wno-double-promotion -Wno-extra-semi-stmt -Wno-gnu-zero-variadic-macro-arguments -Wno-padded -Wno-unused-parameter
-I./RTE/_MK8000_Release
-ID:/keil/pack/MKSEMI/MK800X_DFP/1.0.3/Device/Include
-ID:/keil/ARM/CMSIS/Include
-D__UVISION_VERSION="530" -D_RTE_ -DUWB_EN -DSTD_LIBC
-o ./objects/pca9555.o -MD)
|
| | | I (include\drivers\PCA9555.h)(0x680D9C68)
|
| | | I (include\board\board.h)(0x680D9C68)
|
| | | I (include\drivers\mk_common.h)(0x680D9C68)
|
| | |
| | | I (D:\keil\ARM\ARMCLANG\include\stdarg.h)(0x5DDFFD72)
|
| | | I (include\drivers\mk_gpio.h)(0x680D9C68)
|
| | | I (include\drivers\Usart.h)(0x680D9C68)
|
| | | F (.\include\main\main.c)(0x6821928F)(-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m0 -c
-fno-rtti -funsigned-char
-D__MICROLIB -gdwarf-3 -O3 -ffunction-sections -w -I ./include/board -I ../keil -I .. -I ./include/board -I ./include/CMSIS/Include -I ./include/components/algo/inc -I ./include/components/crc -I ./include/components/libc -I ./include/components/wsf/include -I ./include/components/wsf/include/platform -I ./include/devices/MK800X/Include -I ./include/drivers -I ./include/components/hido/Include -I ./include/components/internet/inc -I ./include/components/hal -I ../keil -I ./include/src -I ./include/components/internet/src -Wno-declaration-after-statement -Wno-double-promotion -Wno-extra-semi-stmt -Wno-gnu-zero-variadic-macro-arguments -Wno-padded -Wno-unused-parameter
-I./RTE/_MK8000_Release
-ID:/keil/pack/MKSEMI/MK800X_DFP/1.0.3/Device/Include
-ID:/keil/ARM/CMSIS/Include
-D__UVISION_VERSION="530" -D_RTE_ -DUWB_EN -DSTD_LIBC
-o ./objects/main.o -MD)
|
| | | F (.\include\main\main.c)(0x68230075)(-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m0 -c
-fno-rtti -funsigned-char
-D__MICROLIB -gdwarf-3 -O3 -ffunction-sections -w -I ./include/board -I ../keil -I .. -I ./include/board -I ./include/CMSIS/Include -I ./include/components/algo/inc -I ./include/components/crc -I ./include/components/libc -I ./include/components/wsf/include -I ./include/components/wsf/include/platform -I ./include/devices/MK800X/Include -I ./include/drivers -I ./include/components/hido/Include -I ./include/components/internet/inc -I ./include/components/hal -I ../keil -I ./include/src -I ./include/components/internet/src -Wno-declaration-after-statement -Wno-double-promotion -Wno-extra-semi-stmt -Wno-gnu-zero-variadic-macro-arguments -Wno-padded -Wno-unused-parameter
-I./RTE/_MK8000_Release
-ID:/keil/pack/MKSEMI/MK800X_DFP/1.0.3/Device/Include
-ID:/keil/ARM/CMSIS/Include
-D__UVISION_VERSION="530" -D_RTE_ -DUWB_EN -DSTD_LIBC
-o ./objects/main.o -MD)
|
| | | I (include\drivers\mk_trace.h)(0x680D9C68)
|
| | | I (include\drivers\mk_common.h)(0x680D9C68)
|
| | | I (D:\keil\ARM\ARMCLANG\include\stddef.h)(0x5DDFFD72)
|
| | |
| | | I (include\drivers\PCA9555.h)(0x680D9C68)
|
| | | I (include\drivers\WS2812.h)(0x680D9C68)
|
| | | I (include\drivers\DBG.h)(0x680D9C68)
|
| | | F (.\include\src\TCPClient.c)(0x681ED1E2)(-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m0 -c
-fno-rtti -funsigned-char
-D__MICROLIB -gdwarf-3 -O3 -ffunction-sections -w -I ./include/board -I ../keil -I .. -I ./include/board -I ./include/CMSIS/Include -I ./include/components/algo/inc -I ./include/components/crc -I ./include/components/libc -I ./include/components/wsf/include -I ./include/components/wsf/include/platform -I ./include/devices/MK800X/Include -I ./include/drivers -I ./include/components/hido/Include -I ./include/components/internet/inc -I ./include/components/hal -I ../keil -I ./include/src -I ./include/components/internet/src -Wno-declaration-after-statement -Wno-double-promotion -Wno-extra-semi-stmt -Wno-gnu-zero-variadic-macro-arguments -Wno-padded -Wno-unused-parameter
-I./RTE/_MK8000_Release
-ID:/keil/pack/MKSEMI/MK800X_DFP/1.0.3/Device/Include
-ID:/keil/ARM/CMSIS/Include
-D__UVISION_VERSION="530" -D_RTE_ -DUWB_EN -DSTD_LIBC
-o ./objects/tcpclient.o -MD)
|
| | | F (.\include\src\TCPClient.c)(0x6822B3F5)(-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m0 -c
-fno-rtti -funsigned-char
-D__MICROLIB -gdwarf-3 -O3 -ffunction-sections -w -I ./include/board -I ../keil -I .. -I ./include/board -I ./include/CMSIS/Include -I ./include/components/algo/inc -I ./include/components/crc -I ./include/components/libc -I ./include/components/wsf/include -I ./include/components/wsf/include/platform -I ./include/devices/MK800X/Include -I ./include/drivers -I ./include/components/hido/Include -I ./include/components/internet/inc -I ./include/components/hal -I ../keil -I ./include/src -I ./include/components/internet/src -Wno-declaration-after-statement -Wno-double-promotion -Wno-extra-semi-stmt -Wno-gnu-zero-variadic-macro-arguments -Wno-padded -Wno-unused-parameter
-I./RTE/_MK8000_Release
-ID:/keil/pack/MKSEMI/MK800X_DFP/1.0.3/Device/Include
-ID:/keil/ARM/CMSIS/Include
-D__UVISION_VERSION="530" -D_RTE_ -DUWB_EN -DSTD_LIBC
-o ./objects/tcpclient.o -MD)
|
| | | I (include\src\TCPClient.h)(0x6819E8A3)
|
| | | I (include\components\hido\Include\HIDO_TYpeDef.h)(0x680D9C68)
|
| | | I (include\components\internet\inc\Socket.h)(0x680D9C68)
|
| | |
| | | I (include\drivers\mk_misc.h)(0x680D9C68)
|
| | | I (include\drivers\serial_at_cmd_app.h)(0x680D9C68)
|
| | | I (include\drivers\DBG.h)(0x680D9C68)
|
| | | F (.\uwb_app.c)(0x681EF4B1)(-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m0 -c
-fno-rtti -funsigned-char
-D__MICROLIB -gdwarf-3 -O3 -ffunction-sections -w -I ./include/board -I ../keil -I .. -I ./include/board -I ./include/CMSIS/Include -I ./include/components/algo/inc -I ./include/components/crc -I ./include/components/libc -I ./include/components/wsf/include -I ./include/components/wsf/include/platform -I ./include/devices/MK800X/Include -I ./include/drivers -I ./include/components/hido/Include -I ./include/components/internet/inc -I ./include/components/hal -I ../keil -I ./include/src -I ./include/components/internet/src -Wno-declaration-after-statement -Wno-double-promotion -Wno-extra-semi-stmt -Wno-gnu-zero-variadic-macro-arguments -Wno-padded -Wno-unused-parameter
-I./RTE/_MK8000_Release
-ID:/keil/pack/MKSEMI/MK800X_DFP/1.0.3/Device/Include
-ID:/keil/ARM/CMSIS/Include
-D__UVISION_VERSION="530" -D_RTE_ -DUWB_EN -DSTD_LIBC
-o ./objects/uwb_app.o -MD)
|
| | | F (.\uwb_app.c)(0x6822FE0E)(-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m0 -c
-fno-rtti -funsigned-char
-D__MICROLIB -gdwarf-3 -O3 -ffunction-sections -w -I ./include/board -I ../keil -I .. -I ./include/board -I ./include/CMSIS/Include -I ./include/components/algo/inc -I ./include/components/crc -I ./include/components/libc -I ./include/components/wsf/include -I ./include/components/wsf/include/platform -I ./include/devices/MK800X/Include -I ./include/drivers -I ./include/components/hido/Include -I ./include/components/internet/inc -I ./include/components/hal -I ../keil -I ./include/src -I ./include/components/internet/src -Wno-declaration-after-statement -Wno-double-promotion -Wno-extra-semi-stmt -Wno-gnu-zero-variadic-macro-arguments -Wno-padded -Wno-unused-parameter
-I./RTE/_MK8000_Release
-ID:/keil/pack/MKSEMI/MK800X_DFP/1.0.3/Device/Include
-ID:/keil/ARM/CMSIS/Include
-D__UVISION_VERSION="530" -D_RTE_ -DUWB_EN -DSTD_LIBC
-o ./objects/uwb_app.o -MD)
|
| | | I (include\drivers\mk_trace.h)(0x680D9C68)
|
| | | I (include\drivers\mk_common.h)(0x680D9C68)
|
| | | I (D:\keil\ARM\ARMCLANG\include\stddef.h)(0x5DDFFD72)
|
| | |
| | | I (include\drivers\WS2812.h)(0x680D9C68)
|
| | | I (include\src\TCPClient.h)(0x6819E8A3)
|
| | | I (include\components\hido\Include\HIDO_TYpeDef.h)(0x680D9C68)
|
| | | I (include\drivers\PCA9555.h)(0x680D9C68)
|
| | | F (.\uwb_tag.c)(0x680EF76B)(-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m0 -c
-fno-rtti -funsigned-char
-D__MICROLIB -gdwarf-3 -O3 -ffunction-sections -w -I ./include/board -I ../keil -I .. -I ./include/board -I ./include/CMSIS/Include -I ./include/components/algo/inc -I ./include/components/crc -I ./include/components/libc -I ./include/components/wsf/include -I ./include/components/wsf/include/platform -I ./include/devices/MK800X/Include -I ./include/drivers -I ./include/components/hido/Include -I ./include/components/internet/inc -I ./include/components/hal -I ../keil -I ./include/src -I ./include/components/internet/src -Wno-declaration-after-statement -Wno-double-promotion -Wno-extra-semi-stmt -Wno-gnu-zero-variadic-macro-arguments -Wno-padded -Wno-unused-parameter
-I./RTE/_MK8000_Release
-ID:/keil/pack/MKSEMI/MK800X_DFP/1.0.3/Device/Include
-ID:/keil/ARM/CMSIS/Include
-D__UVISION_VERSION="530" -D_RTE_ -DUWB_EN -DSTD_LIBC
-o ./objects/uwb_tag.o -MD)
|
| | | I (include\drivers\mk_trace.h)(0x680D9C68)
|
| | | I (include\drivers\mk_common.h)(0x680D9C68)
|
| | |
| | | I (include\drivers\mk_gpio.h)(0x680D9C68)
|
| | | I (include\drivers\mk_io.h)(0x680D9C68)
|
| | | I (include\drivers\mk_calib.h)(0x680D9C68)
|
| | | F (.\include\src\GPS.c)(0x681C5E80)(-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m0 -c
-fno-rtti -funsigned-char
-D__MICROLIB -gdwarf-3 -O3 -ffunction-sections -w -I ./include/board -I ../keil -I .. -I ./include/board -I ./include/CMSIS/Include -I ./include/components/algo/inc -I ./include/components/crc -I ./include/components/libc -I ./include/components/wsf/include -I ./include/components/wsf/include/platform -I ./include/devices/MK800X/Include -I ./include/drivers -I ./include/components/hido/Include -I ./include/components/internet/inc -I ./include/components/hal -I ../keil -I ./include/src -I ./include/components/internet/src -Wno-declaration-after-statement -Wno-double-promotion -Wno-extra-semi-stmt -Wno-gnu-zero-variadic-macro-arguments -Wno-padded -Wno-unused-parameter
-I./RTE/_MK8000_Release
-ID:/keil/pack/MKSEMI/MK800X_DFP/1.0.3/Device/Include
-ID:/keil/ARM/CMSIS/Include
-D__UVISION_VERSION="530" -D_RTE_ -DUWB_EN -DSTD_LIBC
-o ./objects/gps.o -MD)
|
| | | F (.\include\src\GPS.c)(0x6822E7CA)(-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m0 -c
-fno-rtti -funsigned-char
-D__MICROLIB -gdwarf-3 -O3 -ffunction-sections -w -I ./include/board -I ../keil -I .. -I ./include/board -I ./include/CMSIS/Include -I ./include/components/algo/inc -I ./include/components/crc -I ./include/components/libc -I ./include/components/wsf/include -I ./include/components/wsf/include/platform -I ./include/devices/MK800X/Include -I ./include/drivers -I ./include/components/hido/Include -I ./include/components/internet/inc -I ./include/components/hal -I ../keil -I ./include/src -I ./include/components/internet/src -Wno-declaration-after-statement -Wno-double-promotion -Wno-extra-semi-stmt -Wno-gnu-zero-variadic-macro-arguments -Wno-padded -Wno-unused-parameter
-I./RTE/_MK8000_Release
-ID:/keil/pack/MKSEMI/MK800X_DFP/1.0.3/Device/Include
-ID:/keil/ARM/CMSIS/Include
-D__UVISION_VERSION="530" -D_RTE_ -DUWB_EN -DSTD_LIBC
-o ./objects/gps.o -MD)
|
| | | I (D:\keil\ARM\ARMCLANG\include\stdio.h)(0x5DDFFD72)
|
| | | I (D:\keil\ARM\ARMCLANG\include\stdarg.h)(0x5DDFFD72)
|
| | | I (D:\keil\ARM\ARMCLANG\include\stdlib.h)(0x5DDFFD6A)
|
| | |
| | | //PCA9555_Set_All_Output(1); |
| | | |
| | | PCA9555_Set_One_Value_Config(GPS_POWER,0);//设置GPS为è¾åº |
| | | PCA9555_Set_One_Value_Output(GPS_POWER,1);//æé«GPS |
| | | PCA9555_Set_One_Value_Output(GPS_POWER,1);//æé«GPS GPS_BACKUP |
| | | |
| | | PCA9555_Set_One_Value_Config(GPS_BACKUP,0);//设置GPSå¤ç¨çµä¸ºè¾åº |
| | | PCA9555_Set_One_Value_Output(GPS_BACKUP,1); |
| | | |
| | | // while(1) |
| | | PCA9555_Set_One_Value_Config(ADC_MINIUS,0);//设置ADCè¾åº |
| | | PCA9555_Set_One_Value_Output(ADC_MINIUS,1);//é»è®¤æé« |
| | |
| | | #define UWB_MEASUREMENT_INTERVAL 5 |
| | | #define UWB_MEASUREMENT_INTERVAL_SLEEP 30 |
| | | |
| | | |
| | | |
| | | //室å
å¤éå¼ |
| | | #define XINGHAOQIANGDU_VALUE 210 |
| | | #define WEIXINGSHULIANG_VALUE 10 |
| | | uint8_t heart_upload_time=0; |
| | | uint8_t open_gps_time=0; |
| | | |
| | | |
| | | extern uint8_t mUsartReceivePack[100]; |
| | | extern uint8_t mUsart2ReceivePack[150]; |
| | | extern uint8_t state5V_prase_flag,gps_prase_flag; |
| | |
| | | .flow = UART_FLOW_CONTROL_NONE, |
| | | .rx_level = UART_RXFIFO_CHAR_1, |
| | | .tx_level = UART_TXFIFO_EMPTY, |
| | | .baud = BAUD_115200, |
| | | .baud = BAUD_9600, |
| | | #if (TEST_UART_MODE == TEST_UART_POLL_MODE) |
| | | .dma_en = false, |
| | | .int_rx = false, |
| | |
| | | power_wakeup_enable((enum POWER_WAKEUP_SOURCE_T)PCA_INPUT_DETECT, POWER_WAKEUP_LEVEL_LOW); |
| | | mcu_deep_sleep(); |
| | | } |
| | | } |
| | | |
| | | extern uint16_t g_spsum_GSV,g_snum_GSV,g_spsum_GSV_sum,g_snum_GSV_sum; |
| | | extern uint8_t lounei_flag,open_gps_time,ceju_leave_flag,fixed_solution_count_minute; |
| | | void GPS_ONOFF_Task() |
| | | { |
| | | if(30<open_gps_time&&open_gps_time<=90) |
| | | { |
| | | Receive_g_spsum_Data(g_spsum_GSV); |
| | | Receive_g_snum_Data(g_snum_GSV); |
| | | if((g_spsum_GSV_sum<XINGHAOQIANGDU_VALUE||g_snum_GSV_sum<WEIXINGSHULIANG_VALUE)&&(fixed_solution_count_minute<30)) |
| | | { |
| | | lounei_flag=1; |
| | | } |
| | | if((XINGHAOQIANGDU_VALUE<g_spsum_GSV_sum&&WEIXINGSHULIANG_VALUE<g_snum_GSV_sum)&&(fixed_solution_count_minute>30)) |
| | | { |
| | | lounei_flag=0; |
| | | } |
| | | } |
| | | |
| | | if(open_gps_time>90) |
| | | { |
| | | if(ceju_leave_flag==1) |
| | | { |
| | | Receive_g_spsum_Data(g_spsum_GSV); |
| | | Receive_g_snum_Data(g_snum_GSV); |
| | | |
| | | if((g_spsum_GSV_sum<XINGHAOQIANGDU_VALUE||g_snum_GSV_sum<WEIXINGSHULIANG_VALUE)&&(fixed_solution_count_minute<30)) |
| | | { |
| | | lounei_flag=1; |
| | | } |
| | | if((XINGHAOQIANGDU_VALUE<g_spsum_GSV_sum&&WEIXINGSHULIANG_VALUE<g_snum_GSV_sum)&&(fixed_solution_count_minute>30)) |
| | | { |
| | | lounei_flag=0; |
| | | } |
| | | |
| | | if(heart_upload_time==60) |
| | | { |
| | | ceju_leave_flag=0; |
| | | fixed_solution_count_minute=0; |
| | | if(lounei_flag==1) |
| | | { |
| | | PCA9555_Set_One_Value_Output(GPS_POWER,0); |
| | | } |
| | | } |
| | | if(heart_upload_time==0||heart_upload_time==60) |
| | | { |
| | | heart_upload_time=0; |
| | | } |
| | | heart_upload_time++; |
| | | } |
| | | |
| | | } |
| | | if(open_gps_time>149&&lounei_flag==1) |
| | | { |
| | | |
| | | if(open_gps_time-90==60) |
| | | { |
| | | open_gps_time=90; |
| | | TCPHeartBeatUpload(); |
| | | } |
| | | |
| | | |
| | | } |
| | | uwb_app_poll(); |
| | | } |
| | | void powerON_Task(void) |
| | | { |
| | |
| | | { |
| | | input5v_time=1; |
| | | flag_secondtask = 1; |
| | | open_gps_time++; |
| | | #ifdef UWB_1_5HZ |
| | | uwb_time_count++; |
| | | #endif |
| | | uwb_offtime_count++; |
| | | // uwb_offtime_count++; |
| | | if(uwb_offtime_count>60) |
| | | { |
| | | uwb_offtime_count=0; |
| | | current_state = STATE_SLEEP; |
| | | // current_state = STATE_SLEEP; |
| | | } |
| | | if(!read_5v_input_pca()) |
| | | { |
| | |
| | | // OpenUWB(); |
| | | } |
| | | upload_apppoll(); |
| | | GPS_ONOFF_Task(); |
| | | }else{ |
| | | flag_secondtask = 0; |
| | | } |
| | |
| | | case UWB_OPEN_COUNT: |
| | | CloseUWB(); |
| | | UWBSendUDPTask(); |
| | | |
| | | break; |
| | | |
| | | case UWB_MEASUREMENT_INTERVAL: |
| | |
| | | Uwb_init(); |
| | | OpenUWB(); |
| | | state_start_time = uwb_time_count; |
| | | |
| | | break; |
| | | } |
| | | break; |
| | |
| | | #define GPS_UART_RX_BUF_SIZE 1000 |
| | | #define GPS_UART_TX_BUF_SIZE (4) |
| | | |
| | | /**************************************************************************************************************************************/ |
| | | #define ARRAY_SIZE 60 |
| | | uint8_t Gsv_count = 0; // å·²åå¨çæ°æ®ä¸ªæ° |
| | | uint8_t lounei_flag=0; |
| | | /**************************************************************************************************************************************/ |
| | | typedef enum |
| | | { |
| | | GPS_RECV_STATE_IDLE = 0, |
| | |
| | | //static HIDO_UINT32 l_u8GPSLen = 0; |
| | | //static HIDO_UINT32 l_u8GPSRecvTick = 0; |
| | | uint8_t gps_error1,gps_error2; |
| | | extern uint16_t g_spsum_GSV,g_snum_GSV; |
| | | static HIDO_INT32 GPS_ParseGGA(HIDO_CHAR *_pcData, HIDO_UINT32 _u32Len) |
| | | { |
| | | ST_GPS stGPS; |
| | |
| | | } |
| | | |
| | | l_u8PosState = atoi((HIDO_CHAR *)stPosState.m_pData); |
| | | |
| | | g_spsum_GSV=0; |
| | | g_snum_GSV=0; |
| | | return HIDO_OK; |
| | | } |
| | | |
| | | |
| | | uint16_t g_spsum_GSV,g_snum_GSV; |
| | | static HIDO_INT32 GPS_ParseGSV(HIDO_CHAR *_pcData, HIDO_UINT32 _u32Len) |
| | | { |
| | | ST_GPS stGPS; |
| | | HIDO_DataStruct spower[4]; |
| | | |
| | | memset(&stGPS, 0, sizeof(ST_GPS)); |
| | | // if (GPS_DataCheck(_pcData, _u32Len) != HIDO_OK) |
| | | // { |
| | | // return HIDO_ERR; |
| | | // } |
| | | |
| | | if (HIDO_UtilParseFormat((HIDO_UINT8 *) _pcData, _u32Len, "$%*,%*,%*,%*,%*,%*,%*,%p,%*,%*,%*,%p,%*,%*,%*,%p,%*,%*,%*,%p,%**", &spower[0], &spower[1], &spower[2], &spower[3]) == 21) |
| | | { |
| | | g_snum_GSV+=4; |
| | | g_spsum_GSV+=atoi((HIDO_CHAR *)spower[0].m_pData)+atoi((HIDO_CHAR *)spower[1].m_pData)+atoi((HIDO_CHAR *)spower[2].m_pData)+atoi((HIDO_CHAR *)spower[3].m_pData); |
| | | }else if(HIDO_UtilParseFormat((HIDO_UINT8 *) _pcData, _u32Len, "$%*,%*,%*,%*,%*,%*,%*,%p,%*,%*,%*,%p,%*,%*,%*,%p,%**", &spower[0], &spower[1], &spower[2]) == 17) |
| | | { |
| | | g_snum_GSV+=3; |
| | | g_spsum_GSV+=atoi((HIDO_CHAR *)spower[0].m_pData)+atoi((HIDO_CHAR *)spower[1].m_pData)+atoi((HIDO_CHAR *)spower[2].m_pData); |
| | | |
| | | }else if(HIDO_UtilParseFormat((HIDO_UINT8 *) _pcData, _u32Len, "$%*,%*,%*,%*,%*,%*,%*,%p,%*,%*,%*,%p,%**", &spower[0], &spower[1]) == 13) |
| | | { |
| | | g_snum_GSV+=2; |
| | | g_spsum_GSV+=atoi((HIDO_CHAR *)spower[0].m_pData)+atoi((HIDO_CHAR *)spower[1].m_pData); |
| | | |
| | | }else if(HIDO_UtilParseFormat((HIDO_UINT8 *) _pcData, _u32Len, "$%*,%*,%*,%*,%*,%*,%*,%p,%**", &spower[0]) == 9) |
| | | { |
| | | g_snum_GSV+=1; |
| | | g_spsum_GSV+=atoi((HIDO_CHAR *)spower[0].m_pData); |
| | | |
| | | } |
| | | // l_u8PosState = atoi((HIDO_CHAR *)stPosState.m_pData); |
| | | |
| | | return HIDO_OK; |
| | | } |
| | | /******************************************************************************* |
| | | * Function Name : GPS_ParseRMC |
| | | * Description : |
| | |
| | | extern uint8_t GPS_UPLOAD_FLAG; |
| | | uint16_t GPS_UPload_sleep_flag=0; |
| | | uint8_t gpserror; |
| | | uint8_t fixed_solution_count_minute; |
| | | extern uint8_t ceju_leave_flag; |
| | | HIDO_VOID GPS_RecvFsm(HIDO_UINT8 _u8RecvChar) |
| | | { |
| | | switch (l_stGPSRecv.m_eState) |
| | |
| | | rtkled = WHITE; |
| | | break; |
| | | } |
| | | if(ceju_leave_flag==1) |
| | | { |
| | | fixed_solution_count_minute++; |
| | | } |
| | | } |
| | | else if(strstr(l_stGPSRecv.m_acRecvBuf, "GSV,") != HIDO_NULL) |
| | | { |
| | | GPS_ParseGSV(l_stGPSRecv.m_acRecvBuf, l_stGPSRecv.m_u32RecvLen); |
| | | } |
| | | |
| | | else //if(strstr(l_stGPSRecv.m_acRecvBuf, "RMC,") != HIDO_NULL) |
| | | { |
| | | gpserror++; |
| | | } |
| | | |
| | | } |
| | | |
| | | l_stGPSRecv.m_eState = GPS_RECV_STATE_IDLE; |
| | |
| | | |
| | | // HIDO_UtilBzero(&l_stGPSRecv, sizeof(ST_GPSRecv)); |
| | | //} |
| | | |
| | | /******************************************************************************* |
| | | * Function Name : Receive_g_spsum_Data |
| | | * Description : 计ç®å¹³åå¼ |
| | | * Input : newData |
| | | * Output : sum |
| | | * Return : g_spsum_GSV_sum |
| | | *******************************************************************************/ |
| | | uint16_t GSV_sum; |
| | | uint16_t GSV_g_snum_sum; |
| | | uint16_t g_spsum_GSV_sum=300; |
| | | uint16_t g_snum_GSV_sum=10; |
| | | void Receive_g_spsum_Data(int newData) |
| | | { |
| | | GSV_sum +=newData; |
| | | if (Gsv_count < ARRAY_SIZE) |
| | | { |
| | | Gsv_count++; |
| | | } |
| | | if(Gsv_count==60) |
| | | { |
| | | g_spsum_GSV_sum=GSV_sum/Gsv_count; |
| | | GSV_sum=0; |
| | | } |
| | | } |
| | | |
| | | void Receive_g_snum_Data(int newData) |
| | | { |
| | | GSV_g_snum_sum +=newData; |
| | | if(Gsv_count==60) |
| | | { |
| | | g_snum_GSV_sum=GSV_g_snum_sum/Gsv_count; |
| | | GSV_g_snum_sum=0; |
| | | Gsv_count=0; |
| | | // in_the_room_flag=0; |
| | | } |
| | | } |
| | |
| | | extern uint8_t GPS_ParseGGA_data[256]; |
| | | extern uint8_t GPS_ParseGGA_changdu; |
| | | uint8_t uwbsendnum,gpssendnum; |
| | | |
| | | extern uint16_t g_spsum_GSV_sum,g_snum_GSV_sum; |
| | | extern uint8_t lounei_flag; |
| | | void UDPClient_UploadGPS(HIDO_CHAR *_pcGGA) |
| | | { |
| | | if(TCP_CLIENT_STATE_CONNECTED == l_eTCPClientState) |
| | | { |
| | | |
| | | HIDO_UINT32 u32Len = HIDO_UtilSnprintf((HIDO_CHAR *)l_au8CmdBuff, sizeof(l_au8CmdBuff), "%s,%X,%02x,%x,%d,%d,%d%\r\n", |
| | | _pcGGA, g_com_map[DEV_ID], bat_percent,ave_sp,0,0,0); |
| | | _pcGGA, g_com_map[DEV_ID], bat_percent,ave_sp,g_spsum_GSV_sum,g_snum_GSV_sum,lounei_flag); |
| | | |
| | | |
| | | // if((l_u32UploadBuffLen + u32Len) < sizeof(l_acUploadBuff)) |
| | |
| | | #include "lib_aoa.h" |
| | | #include "WS2812.h" |
| | | #include "TCPClient.h" |
| | | #include "PCA9555.h" |
| | | |
| | | extern int simple_main(void); |
| | | extern int temp_main(void); |
| | |
| | | // } |
| | | // anchordata_num=j; |
| | | //} |
| | | |
| | | //void TagListUpdate(void) |
| | | //{ |
| | | //uint16_t i,j=0,k=0; |
| | | // for(i=0; i<taglist_num; i++) |
| | | // { |
| | | // if(tagofflinetime[i]++<TAG_KEEPTIMES) |
| | | // { |
| | | // tagid_list[j]=tagid_list[i]; |
| | | // tagdist_list[j] = tagdist_list[i]; |
| | | // anchordata_bat[j]=anchordata_bat[i];//çµéé乿´æ° |
| | | // anchor_rssi[j]=anchor_rssi[i]; |
| | | // tagofflinetime[j++]=tagofflinetime[i]; |
| | | // } |
| | | // } |
| | | // taglist_num=j; |
| | | //} |
| | | extern uint8_t in_the_room_flag; |
| | | extern uint8_t lounei_flag; |
| | | uint8_t ceju_onlinetime; |
| | | uint16_t last_id=0; |
| | | uint8_t ceju_leave_flag=0; |
| | | |
| | | void TagListUpdate(void) |
| | | { |
| | | uint16_t i,j=0,k=0; |
| | |
| | | anchordata_bat[j]=anchordata_bat[i];//çµéé乿´æ° |
| | | anchor_rssi[j]=anchor_rssi[i]; |
| | | tagofflinetime[j++]=tagofflinetime[i]; |
| | | last_id=tagid_list[i]; |
| | | if(last_id=tagid_list[i]) |
| | | { |
| | | ceju_onlinetime++; |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | if(ceju_onlinetime>0&&taglist_num==0) |
| | | { |
| | | ceju_onlinetime=0; |
| | | ceju_leave_flag=1; |
| | | } |
| | | taglist_num=j; |
| | | } |
| | | |
| | | uint8_t position; |
| | | uint8_t resp_tx_error; |
| | | uint8_t Anchor_RecNearPoll(uint8_t ancrec_nearbasepos)//æ ¹æ®èªå·±æ¯å¦ä¸ºæ°åºç«å®å¶æ¶æ¯å»åéï¼æ ¹æ®æ¯å¦æ¢å 夿 |
| | |
| | | uwb_offtime_count=0; |
| | | current_state = STATE_NORMAL; |
| | | if(group_id==rx_buf[GROUP_ID_IDX]&&rx_buf[MESSAGE_TYPE_IDX] == MBX_POLL)//夿æ¯å¦æ¯åèªå·±æ¯åä¸ç»é讯çä¸ä¸ºpollå
|
| | | { flag_recsuccess = 1; |
| | | { |
| | | PCA9555_Set_One_Value_Output(GPS_POWER,1); |
| | | flag_recsuccess = 1; |
| | | wltag_state=RANGE;//æååä»searchåæ¢ä¸ºrange |
| | | memcpy(&g_com_receive_id,&rx_buf[TAG_ID_IDX],2); |
| | | |
| | | //temp_count2=phy_timer_count_get(); |
| | | uwb_losttimer=0;//æåæµè·æ¸
0 lostæ¶é´ |
| | | frame_seq_nb2 = rx_buf[SEQUENCE_IDX];//è·åå
åº |
| | |
| | | <SetRegEntry> |
| | | <Number>0</Number> |
| | | <Key>DLGUARM</Key> |
| | | <Name>d</Name> |
| | | <Name></Name> |
| | | </SetRegEntry> |
| | | <SetRegEntry> |
| | | <Number>0</Number> |
| | |
| | | <WinNumber>2</WinNumber> |
| | | <ItemText>state_start_time,0x0A</ItemText> |
| | | </Ww> |
| | | <Ww> |
| | | <count>21</count> |
| | | <WinNumber>2</WinNumber> |
| | | <ItemText>Gsv_count,0x0A</ItemText> |
| | | </Ww> |
| | | <Ww> |
| | | <count>22</count> |
| | | <WinNumber>2</WinNumber> |
| | | <ItemText>g_spsum_GSV_sum,0x0A</ItemText> |
| | | </Ww> |
| | | <Ww> |
| | | <count>23</count> |
| | | <WinNumber>2</WinNumber> |
| | | <ItemText>newData</ItemText> |
| | | </Ww> |
| | | <Ww> |
| | | <count>24</count> |
| | | <WinNumber>2</WinNumber> |
| | | <ItemText>g_spsum_GSV</ItemText> |
| | | </Ww> |
| | | <Ww> |
| | | <count>25</count> |
| | | <WinNumber>2</WinNumber> |
| | | <ItemText>GSV_sum</ItemText> |
| | | </Ww> |
| | | <Ww> |
| | | <count>26</count> |
| | | <WinNumber>2</WinNumber> |
| | | <ItemText>g_snum_GSV</ItemText> |
| | | </Ww> |
| | | <Ww> |
| | | <count>27</count> |
| | | <WinNumber>2</WinNumber> |
| | | <ItemText>g_spsum_GSV</ItemText> |
| | | </Ww> |
| | | </WatchWindow2> |
| | | <MemoryWindow1> |
| | | <Mm> |