From 995520164de261b2536019b66a3d6c44fefc7a10 Mon Sep 17 00:00:00 2001 From: wangfq Date: Fri, 26 Jun 2026 11:55:43 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=9C=89=E8=BD=A6=E6=97=B6=E6=A0=B9?= =?UTF-8?q?=E6=8D=AE=20hold=5Ftime=20=E5=90=AF=E7=94=A8=E6=9C=89=E9=99=90?= =?UTF-8?q?=E5=AD=98=E5=9C=A8=E8=AE=A1=E6=97=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit vd1_task_per_channel 判定有车 (loop_VD_FLAG=1) 时, 若 hold_time > 0 则设置 loop_VD_HOLD = 1, 使有限存在超时逻辑能够实际生效。 hold_time=0 (exist_mode=0) 时不设 VD_HOLD,保持无限制存在。 --- vd960Loop/utilities/at32f421_freertos_demo/src/TaskLoop.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vd960Loop/utilities/at32f421_freertos_demo/src/TaskLoop.c b/vd960Loop/utilities/at32f421_freertos_demo/src/TaskLoop.c index 480de0c..784b83d 100644 --- a/vd960Loop/utilities/at32f421_freertos_demo/src/TaskLoop.c +++ b/vd960Loop/utilities/at32f421_freertos_demo/src/TaskLoop.c @@ -469,6 +469,9 @@ void vd1_task_per_channel(Loop154_Unit *unit) unit->loop_VD_FLAG = 1; unit->loop_FLAG_IN = 1; + if (unit->hold_time > 0) { + unit->loop_VD_HOLD = 1; + } at32_led_on(unit->loop_num); if (!unit->SET_SAFE) {