WXK
2023-09-04 01a4770ea1b96c1006e5a84d133001b229f950b4
FML/lora.c
@@ -264,7 +264,8 @@
 * Return            :
 * Author            : hido.ltd
 *******************************************************************************/
extern void delay_ms(uint32_t nTimer)  ;
extern uint8_t lora_sendfinal_rx_bag_flag;
void Lora_Poll(void)
{
    HIDO_UINT8 u8Byte = 0;
@@ -281,7 +282,7 @@
            memset(&lora_rxbuf,0,sizeof(lora_rxbuf));
            lora_rxbufnum=0;
          }
        }
        }
        memcpy(&lora_recv_devid,&lora_rxbuf[2],2);
        if(lora_recv_devid==dev_id)
        {
@@ -290,10 +291,13 @@
            memset(&lora_rxbuf,0,sizeof(lora_rxbuf));
            lora_rxbufnum=0;
            lora_sendfinalbag_flag=0;
            lora_sendfinal_rx_bag_flag=0;
        }
        if(lora_rxbuf[4]==0x02)//接收下发修改GPS开关时间参数
        {  
            memcpy(&lora_recv_gpstime,&lora_rxbuf[5],2);
            if(lora_recv_gpstime<=1800)
                lora_recv_gpstime=1800;
            g_com_map[GPS_ONTIME]=lora_recv_gpstime;
            save_com_map_to_flash();
            delay_ms(100);
@@ -302,6 +306,8 @@
        if(lora_rxbuf[4]==0x03)//接收下发修改静止休眠时间参数
        {  
            memcpy(&lora_recv_gpstime,&lora_rxbuf[5],2);
                if(lora_recv_gpstime<=10)
                lora_recv_gpstime=10;
            g_com_map[NOMOVESLEEP_TIME]=lora_recv_gpstime;
            save_com_map_to_flash();
            delay_ms(100);