zhangbo
6 天以前 06f866e6a4f05cff3b5f6ab30179c89906d26c0b
keil/include/main/main.c
@@ -272,6 +272,7 @@
            userkey_state = 1;
            keystarttime3 =  HIDO_TimerGetTick();
            flag_first_TCPconnect = 1;
//            TCPHeartBeatUpload();
            //UDPClient_UploadGPS();
        }
//        if(HIDO_TimerGetTick() - keystarttime2>10)
@@ -329,6 +330,7 @@
    }
    
}
uint8_t jingzhi_flag=0;
void SecondTask(void)
{   static uint8_t second_count;
    if(second_count++>60)
@@ -360,6 +362,10 @@
    HIDO_TimerTick();
//      if(nomove_count<=g_com_map[NOMOVESLEEP_TIME])//防止溢出
    nomove_count++;
    if(nomove_count>g_com_map[ALARM_DISTANCE1])
    {
      jingzhi_flag=1;
    }
//    gaodu=GetPressAndHeight()*100;
//      else{
//      nomove_count=g_com_map[NOMOVESLEEP_TIME]+1;
@@ -537,6 +543,7 @@
//    g_com_map[GROUP_ID]=9;
    group_id=g_com_map[GROUP_ID];//组ID
    memcpy(&disoffset,&g_com_map[DIST_OFFSET],2);
//    g_com_map[ALARM_DISTANCE1]=10;
    warning_distance=g_com_map[ALARM_DISTANCE1];
    prewarning_distance=g_com_map[ALARM_DISTANCE2];
    send_struct.warnDistence=warning_distance;
@@ -587,7 +594,7 @@
    g_com_map[MODBUS_MODE] = 0;
    log_4g_enable_flag =1;//g_com_map[LOG_4G_ENABLE];
    g_com_map[VERSION] = (2<<8)|14;
    g_com_map[VERSION] = (2<<8)|19;
    LOG_INFO(TRACE_MODULE_APP,"设备ID: %x .\r\n",dev_id);
@@ -674,7 +681,7 @@
                only_one_flag=1;
                chongman_time=0;
            }
            if(bat_percent>=99&&chongman_time>=180)
            if(bat_percent>=99&&chongman_time>=720)
            {
                powerled = GREEN;
            } else {