1
WXK
2024-03-15 a46995649b1360998b0e59cd6c7708bd6e887cfa
Src/radio/Lora.c
@@ -225,7 +225,7 @@
                        target_count = current_count + rec_delaytime*3.2768 - delaytime;
                        while(target_count>=32768)
                            target_count-=32768;
                        __HAL_LPTIM_COMPARE_SET(&hlptim1, target_count);
//                        __HAL_LPTIM_COMPARE_SET(&hlptim1, target_count);
                        rx_count = HAL_LPTIM_ReadCounter(&hlptim1);
                     //   printf("tx %d,rx %d,delay %d",current_count>>5,rx_count>>5,rec_delaytime);
                        break;
@@ -282,7 +282,7 @@
    target_count-=current_count%3276;
    while(target_count<0)
        target_count+=32768;
    __HAL_LPTIM_COMPARE_SET(&hlptim1, target_count);
//    __HAL_LPTIM_COMPARE_SET(&hlptim1, target_count);
    SwitchLoraSettings(UWB_CHANNEL_FRQ+g_com_map[GROUP_ID],UWB_CHANNEL_SF,0);
    Radio.Rx(0);
}