keil/include/main/main.c
@@ -506,10 +506,10 @@
    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];
    g_com_map[VERSION] = (1<<8)|0;
    g_com_map[VERSION] = (1<<8)|1;
    LOG_INFO(TRACE_MODULE_APP,"设备ID: %x .\r\n",dev_id);
    LOG_INFO(TRACE_MODULE_APP,"固件版本:4G-GPS定位手环 V%d.%d. \r\n",g_com_map[VERSION]>>8,g_com_map[VERSION]&0xff);
    LOG_INFO(TRACE_MODULE_APP,"服务器地址: %d.%d.%d.%d:%d.\r\n",ip0,ip1,ip2,ip3,port);
    LOG_INFO(TRACE_MODULE_APP,"铁鞋升级工卡\r\n",ip0,ip1,ip2,ip3,port);
}
@@ -657,6 +657,7 @@
extern uint32_t tempflag;
    uint32_t tx_en_start_u32;
    uint32_t tx_en_start_u321;
uint8_t baifenbi=5;
void Lora_upanc_ing_Poll( void )
{   uint16_t crc16;
//    if(Lora_upanc_flag==1)
@@ -681,7 +682,11 @@
//            LOG_INFO(TRACE_MODULE_APP, "升级进度%d\r\n",jindu);
            Dtu_shengji_jindu[4]=jindu;
            memcpy(&Dtu_shengji_jindu[5],&mubiao_anchor_ID,2);
            if(jindu>baifenbi)
            {
            uart_send(UART_ID0, Dtu_shengji_jindu,9, NULL);
                baifenbi=baifenbi+10;
            }
            tx_en_start_u32 = phy_timer_count_get()+US_TO_PHY_TIMER_COUNT(100U);//发送必须要延时发送才可以用于测距否则立即发送会获取时间戳不对,需要计算程序运行时间,避免设置过去时间
            tempflag=uwb_tx(send_lora_data,DATA_IDX+ONE_BAG_DAXIAO+2+2,1,tx_en_start_u32);//立即发送  
            tx_en_start_u321= phy_timer_count_get();
@@ -690,6 +695,7 @@
        }
//    }
}
extern uint8_t shengji_flag;
int main(void)
{
    board_clock_run();
@@ -783,6 +789,7 @@
      //board_4GUsart_detection_init(_4gUsart_handler);
    while (1)
    { 
        if(!shengji_flag)
         uwb_app_poll();
//         Lora_upanc_ing_Poll();
         //test4=gpio_pin_get_val(SCL_PIN);