From f7b52d9d2ec9debf957d88b6294707960f5e7354 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=95=E6=98=8E=E6=B1=9F?= <246462502@qq.com> Date: Sat, 13 Jul 2024 19:10:00 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E5=A2=9E=E5=8A=A0=E9=81=BF=E9=9A=9C?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E5=8F=AF=E8=B0=83=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/gl_barrier.c | 6 +++--- app/gl_barrier.h | 2 +- app/jj_param.c | 1 + app/jj_param.h | 1 + 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/gl_barrier.c b/app/gl_barrier.c index fadb26b..8ce6fc8 100644 --- a/app/gl_barrier.c +++ b/app/gl_barrier.c @@ -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); diff --git a/app/gl_barrier.h b/app/gl_barrier.h index bb4b136..ffa2059 100644 --- a/app/gl_barrier.h +++ b/app/gl_barrier.h @@ -30,7 +30,7 @@ extern float (*mid_track_s)[2]; extern int32_t mid_track_count_s; extern int temp_min_s; extern int temp_max_s; - +extern float barrirer_time; void CheckBarrier(void); void Check_s(void); void RunBarrier(void); diff --git a/app/jj_param.c b/app/jj_param.c index 727c609..797dc8c 100644 --- a/app/jj_param.c +++ b/app/jj_param.c @@ -30,6 +30,7 @@ void jj_param_eeprom_init(void) PARAM_REG(aim_turn, &turn_aim, EFLOAT, 1, "tur:"); PARAM_REG(baoguang, &FIX_BINTHRESHOLD, EFLOAT, 1, "bao:"); PARAM_REG(auto_exp_param, &auto_exp, EFLOAT, 1, "exp:"); + PARAM_REG(barr_time, &barrirer_time, EFLOAT, 1, "bar:"); jj_param_read(); // 注冊 } /** diff --git a/app/jj_param.h b/app/jj_param.h index e9b3673..e36f8d2 100644 --- a/app/jj_param.h +++ b/app/jj_param.h @@ -30,6 +30,7 @@ typedef enum { // 第二页参数 baoguang = Page2_head, auto_exp_param, + barr_time, Page3_head, DATA_IN_FLASH_NUM,