| | |
| | | lora_sendfinalbag_Poll();//lora在gps成功获得位置坐标或者超过1分钟没有获得时发送gps最后一包数据的函数,之后1分钟(10s)发一次,除非lora收到消除标志位或者发送超过10次 |
| | | } |
| | | #if 1 |
| | | if((Lora_IsIdle() == HIDO_TRUE) && (GPS_IsIdle() == HIDO_TRUE)&&(lora_sendfinal_rx_bag_flag==0) |
| | | && (IsTypecCActive() == HIDO_FALSE) /*&& (IsVibration() == HIDO_FALSE)*/) |
| | | if(((Lora_IsIdle() == HIDO_TRUE)/*为了防止lora初始化的时候进入休眠*/ |
| | | && (GPS_IsIdle() == HIDO_TRUE)/*防止gps工作时进入休眠*/ |
| | | &&(lora_sendfinal_rx_bag_flag==0)//防止lora在2s等待接收的时候进入休眠 |
| | | && (IsTypecCActive() == HIDO_FALSE)) /*5v输入检测时不休眠*/||nomove_flag==1/*静止1小时立刻休眠。*/) |
| | | { |
| | | ////// if(Lora_IsIdle() == HIDO_TRUE) |
| | | Power_Sleep(); |
| | |
| | | { |
| | | case GPS_OFF: |
| | | { |
| | | if(lp_time-GPSDateTime > g_com_map[GPS_ONTIME] || IsVibration() == HIDO_TRUE||uwbqiehuangps_flag==1) |
| | | if(lp_time-GPSDateTime > g_com_map[GPS_ONTIME] /*|| IsVibration() == HIDO_TRUE*/||uwbqiehuangps_flag==1) |
| | | { |
| | | uwbqiehuangps_flag=0; |
| | | l_bIsVibration = HIDO_FALSE; |
| | |
| | | { |
| | | lora_sendfinalbag_flag=1; |
| | | lora_sendfinal_rx_bag_flag=1; |
| | | // lora_sendfinal_rx_time=lp_time; |
| | | HIDO_Debug("GPS OFF\r\n"); |
| | | Power_GPS_LoraOff(); |
| | | l_eGPSState = GPS_OFF; |
| | |
| | | { |
| | | lora_sendfinalbag_flag=1; |
| | | lora_sendfinal_rx_bag_flag=1; |
| | | // lora_sendfinal_rx_time=lp_time; |
| | | HIDO_Debug("GPS SUCCESS\r\n"); |
| | | Power_GPS_LoraOff(); |
| | | l_eGPSState = GPS_OFF; |
| | |
| | | { |
| | | Power_GPS_LoraOff(); |
| | | l_eGPSState = GPS_OFF; |
| | | // uwbqiehuangps_flag=1; |
| | | } |
| | | /* 拆卸告警 */ |
| | | if(IsDisassemblyAlarm()) |