yincheng.zhong
2024-08-24 f75001304e4363ca659ebdf98e75a5c26bb0b083
keil/include/main/main.c
@@ -232,6 +232,12 @@
{
    nomove_count=0;
}
static void _4gUsart_handler(enum IO_PIN_T pin)
{
    io_pin_mux_set(_4G_USART_RX_Pin,IO_FUNC4);
    AIR780EUartInit();
}
void Program_Init(void)
{
    Usart1ParseDataCallback = UsartParseDataHandler;//需改为默认为gps处理,UsartParseDataHandler为升级处理当调试时候改为
@@ -369,6 +375,7 @@
    sleep_timer_start(__MS_TO_32K_CNT(1000));//测试
    //board_5V_input_init(voltage_input_handler);
    board_acceleration_detection_init(move_handler);
    AIR780E_Reset(); //4G模块重启,耗时1.5秒
    while (1)
    {
@@ -429,6 +436,7 @@
#ifndef DEBUG_MODE
if(!gpio_pin_get_val(INPUT_5V_Pin)&&((IfTCPConnected()&&Socket_IsSendQueueEmpty(0))||!flag_TCP_reconnectting&&!IfTCPConnected())) //进入休眠条件(与关系,全满足才进):1.没有5V输入 2 TCP已连接时发送队列为空||TCP无连接时不在重连状态。
            {
             board_4GUsart_detection_init(_4gUsart_handler);
         //   LOG_INFO(TRACE_MODULE_APP, "进入休眠");  
                flag_4guart_needinit = 1;
            trace_flush();