|
|
@@ -913,7 +913,7 @@ void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim) |
|
|
|
int32_t current_section_pulses = __HAL_TIM_GetAutoreload(&htim2); |
|
|
|
if(g_plsr_mod_flag == 1) |
|
|
|
{ |
|
|
|
current_section_pulses -= 1; |
|
|
|
current_section_pulses; |
|
|
|
g_plsr_mod_flag = 0; |
|
|
|
} |
|
|
|
AllPluse += current_section_pulses; |
|
|
@@ -1373,7 +1373,7 @@ void PLSR_Section_StartNewSection(PLSR_RouteConfig_t* route) |
|
|
|
current_section->actual_pulse = current_section->target_pulse - g_plsr_location; |
|
|
|
if(g_plsr_mod_flag == 1) |
|
|
|
{ |
|
|
|
current_section->actual_pulse += 1; |
|
|
|
current_section->actual_pulse; |
|
|
|
//g_plsr_mod_flag = 0; // 清除修改标记 |
|
|
|
} |
|
|
|
} |
|
|
@@ -1386,7 +1386,7 @@ void PLSR_Section_StartNewSection(PLSR_RouteConfig_t* route) |
|
|
|
current_section->actual_pulse = total_se_pluse + current_section->target_pulse - g_plsr_total_pulse_count; |
|
|
|
else |
|
|
|
current_section->actual_pulse = total_se_pluse + (-current_section->target_pulse) - g_plsr_total_pulse_count; |
|
|
|
current_section->actual_pulse += 1; |
|
|
|
current_section->actual_pulse; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|