feat:增加避障时间可调参数
This commit is contained in:
@@ -10,7 +10,7 @@ int temp_min_s;
|
||||
int temp_max_s;
|
||||
int barrier_begin_flag = 0;
|
||||
int barrier_count = 0;
|
||||
|
||||
float barrirer_time=500.f;
|
||||
void CheckBarrier()
|
||||
{
|
||||
if (barrier_type == BARRIER_NONE && Lpt0_found_barrier_in && !Lpt1_found_barrier_in && is_straight1) {
|
||||
@@ -33,7 +33,7 @@ void RunBarrier()
|
||||
}
|
||||
if (barrier_type == BARRIER_LEFT_RUNNING)
|
||||
{
|
||||
if (timer_get(TIM_2) >= 500)
|
||||
if (timer_get(TIM_2) >= barrirer_time)
|
||||
{
|
||||
barrier_type = BARRIER_NONE;
|
||||
timer_stop(TIM_2);
|
||||
@@ -126,7 +126,7 @@ void RunBarrier()
|
||||
}
|
||||
if (barrier_type == BARRIER_RIGHT_RUNNING)
|
||||
{
|
||||
if (timer_get(TIM_2) >= 500)
|
||||
if (timer_get(TIM_2) >= barrirer_time)
|
||||
{
|
||||
barrier_type = BARRIER_NONE;
|
||||
timer_stop(TIM_2);
|
||||
|
||||
Reference in New Issue
Block a user