Src/radio/Lora.c
@@ -263,7 +263,8 @@
            UWB_Wkup();
        HAL_GPIO_WritePin(GPIOA, GPIO_PIN_12, GPIO_PIN_SET);
            MbxTagUwbRec();           
            HAL_GPIO_WritePin(RADIO_NSS_GPIO_Port, RADIO_NSS_Pin, GPIO_PIN_RESET); //片选lora有效
            Radio.Rx(0);
    }
    if(RX_Buffer[MSG_TYPE_IDX]==LORA_MSGTYPE_WGRESPTAG)
    {
@@ -352,7 +353,6 @@
                }
            }
        }
    }
    if(!no_rx_flag)
    {
        if(lora_jianting_flag&&LoraUp_flag==0)
@@ -361,7 +361,9 @@
            Radio.Rx(0);
        }
    }
    HAL_GPIO_WritePin(GPIOA, GPIO_PIN_12, GPIO_PIN_RESET);
}
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_12, GPIO_PIN_RESET);
}
void OnTxTimeout( void )
@@ -375,10 +377,11 @@
void OnRxTimeout( void )
{
    Radio.Standby();
    if(wg_state==WG_Lost)
    {
        current_count = HAL_LPTIM_ReadCounter(&hlptim1);
        target_count-=current_count%3276;
//        current_count = HAL_LPTIM_ReadCounter(&hlptim1);
//        target_count-=current_count%3276;
        target_count-=66;//提前2ms发lora
        while(target_count<0)
            target_count+=32768;
        __HAL_LPTIM_COMPARE_SET(&hlptim1, target_count);