keil/include/main/main.c
@@ -288,6 +288,8 @@
      gps_need_data_flag=1;
      gps_wait_count2=0;
      gps_wait_count=0;
      beepontime=0;
      beep_start_flag=0;
      }
      if(control_close_flag)
      {
@@ -311,6 +313,7 @@
      }else{
      control_close_count=0;
      }
//      HIDO_TimerTick();
      LED_Task();
    //UWB状态检测
if(!power_low_flag&&active_flag)//低供电下不需要检测重连
@@ -396,8 +399,11 @@
}
void  handle_single_click(void)
{
beepontime=1;
beep_start_flag=1;
//beepontime=1;
//beep_start_flag=1;
motor_off();
//      motor_on_and_off(&motor_power_state);
//      motor_power_state=1;
}
// 时间阈值定义
@@ -419,6 +425,7 @@
{
sos_state=WAIT_NEXT_RISING;
falling_time=HIDO_TimerGetTick();
motor_on();
}
void click_Task(void)
{
@@ -487,11 +494,13 @@
      {
      click_count=0;
      long_press_flag=1;
      sos_state=IDLE;   
      }else{
      click_count=0;
      sos_state=IDLE;   
      }
      motor_off();
      temp_rising_time=rising_time;
   }
}else if(sos_state==WAIT_NEXT_FALLING)
@@ -506,6 +515,7 @@
         click_count=0;
         sos_state=IDLE;
      }
   }
}
void UserKeyTask(void)
@@ -579,7 +589,7 @@
    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)|16;
    g_com_map[VERSION] = (1<<8)|18;
    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);