From c0a472466cd8e8e1fa66354b8d8e3fabce758765 Mon Sep 17 00:00:00 2001 From: yincheng.zhong <634916154@qq.com> Date: 星期三, 28 八月 2024 15:30:24 +0800 Subject: [PATCH] Merge branch '安邦测距手环' of http://47.108.70.204:60062/r/ChinaUWBProject into 安邦测距手环 --- keil/include/main/main.c | 17 +++++++++++++++-- 1 files changed, 15 insertions(+), 2 deletions(-) diff --git a/keil/include/main/main.c b/keil/include/main/main.c index e88bda8..c62a079 100644 --- a/keil/include/main/main.c +++ b/keil/include/main/main.c @@ -168,7 +168,7 @@ bat_percent = ((fVoltage_mv - 3300) /8); } } - LOG_INFO(TRACE_MODULE_APP, "The voltage is %%%d \r\n",bat_percent); + // LOG_INFO(TRACE_MODULE_APP, "The voltage is %%%d \r\n",bat_percent); } //void UartInit(void) //{ @@ -291,6 +291,7 @@ // flag_4G_recdata = 1; // AIR780EUartInit(); } +extern uint16_t ip0,ip1,ip2,ip3,port; void Program_Init(void) { Usart1ParseDataCallback = UsartParseDataHandler;//需改为默认为gps处理,UsartParseDataHandler为升级处理当调试时候改为 @@ -314,6 +315,18 @@ }else{ UWB_work_state = SEARCH_DEV; } + if(g_com_map[SEND_4G_SECOND]<60) + g_com_map[SEND_4G_SECOND]=60; + + ip0 = (g_com_map[TCP_IP_0]>>12&0xf)*1000+(g_com_map[TCP_IP_0]>>8&0xf)*100+(g_com_map[TCP_IP_0]>>4&0xf)*10+(g_com_map[TCP_IP_0]&0xf); + ip1 = (g_com_map[TCP_IP_1]>>12&0xf)*1000+(g_com_map[TCP_IP_1]>>8&0xf)*100+(g_com_map[TCP_IP_1]>>4&0xf)*10+(g_com_map[TCP_IP_1]&0xf); + ip2 = (g_com_map[TCP_IP_2]>>12&0xf)*1000+(g_com_map[TCP_IP_2]>>8&0xf)*100+(g_com_map[TCP_IP_2]>>4&0xf)*10+(g_com_map[TCP_IP_2]&0xf); + ip3 = (g_com_map[TCP_IP_3]>>12&0xf)*1000+(g_com_map[TCP_IP_3]>>8&0xf)*100+(g_com_map[TCP_IP_3]>>4&0xf)*10+(g_com_map[TCP_IP_3]&0xf); + port = (g_com_map[TCP_PORT]>>12&0xf)*1000+(g_com_map[TCP_PORT]>>8&0xf)*100+(g_com_map[TCP_PORT]>>4&0xf)*10+(g_com_map[TCP_PORT]&0xf); + g_com_map[VERSION] = (1<<8)|1; + LOG_INFO("设备ID: %x .\r\n",dev_id); + LOG_INFO("固件版本:UWB-4G手环 V%d.%d. \r\n",g_com_map[VERSION]>>8,g_com_map[VERSION]&0xff); + LOG_INFO("服务器地址: %d.%d.%d.%d:%d.\r\n",ip0,ip1,ip2,ip3,port); } @@ -447,7 +460,7 @@ board_5V_input_init(voltage_input_handler); board_acceleration_detection_init(move_handler); // LOG_INFO(TRACE_MODULE_APP, "测试进入app"); - //AIR780E_Reset(); //4G模块重启,耗时1.5秒,这个是无法同步的关键 + AIR780E_Reset(); //4G模块重启,耗时1.5秒,这个是无法同步的关键 while (1) { if(flag_TCP_reconnectting||IfTCPConnected()) -- Gitblit v1.9.3