|
|
@@ -902,7 +902,7 @@ void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim) |
|
|
|
PLSR_Route_PWM_Stop(); |
|
|
|
} |
|
|
|
else PLSR_Section_PWM_Stop(); |
|
|
|
|
|
|
|
// PLSR_Route_PWM_Stop(); |
|
|
|
// 精确累加当前段已发送的脉冲数 |
|
|
|
int32_t current_section_pulses = __HAL_TIM_GetAutoreload(&htim2); |
|
|
|
if(g_plsr_mod_flag == 1) |
|
|
@@ -1981,6 +1981,9 @@ void PLSR_TaskSectionSwitch(PLSR_RouteConfig_t* route) |
|
|
|
PLSR_SectionConfig_t* current_section = &route->section[route->current_section_num - 1]; |
|
|
|
if(current_section->wait_condition.wait_type == PLSR_WAIT_EXT_EVENT) |
|
|
|
{ |
|
|
|
route->current_freq = 0; |
|
|
|
route->initial_freq = 0; |
|
|
|
PLSR_Route_PWM_Stop(); |
|
|
|
/* 如果当前段等待外部事件,检查是否有事件触发 */ |
|
|
|
if (PLSR_Wait_CheckExtEvent(route)) |
|
|
|
{ |
|
|
|