From 2b07faacf6d1ce3de7ace73af366e5b84e652c14 Mon Sep 17 00:00:00 2001 From: WXK <287788329@qq.com> Date: 星期三, 13 十一月 2024 16:37:43 +0800 Subject: [PATCH] Merge branch '免布线标签-lora-泰斗GPS' of http://47.108.70.204:60062/r/XRange_Tag into 免布线标签-lora-泰斗GPS --- Src/radio/Lora.c | 15 +++++++++------ 1 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Src/radio/Lora.c b/Src/radio/Lora.c index 611fc24..a68095a 100644 --- a/Src/radio/Lora.c +++ b/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); -- Gitblit v1.9.3