From 7af3631b8e09aaebc5649d50216b8220a733773a Mon Sep 17 00:00:00 2001 From: wangfq Date: Fri, 24 Jul 2026 17:47:11 +0800 Subject: [PATCH] =?UTF-8?q?fix(opt):=20=E4=BF=AE=E6=AD=A3=E5=85=89?= =?UTF-8?q?=E8=80=A6=20500ms=20=E9=98=88=E5=80=BC=20=E2=80=94=20mstick()?= =?UTF-8?q?=20=E5=8D=95=E4=BD=8D=E6=98=AF=205ms/tick?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit mstick() = TimingDelayInc (TMR1 ISR 每 5ms++) 500 → 2.5s, 应为 100 → 500ms --- BLE/DLD154Pro_Peripheral_28K/APP/peripheral_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BLE/DLD154Pro_Peripheral_28K/APP/peripheral_main.c b/BLE/DLD154Pro_Peripheral_28K/APP/peripheral_main.c index 1c8582d..0239785 100644 --- a/BLE/DLD154Pro_Peripheral_28K/APP/peripheral_main.c +++ b/BLE/DLD154Pro_Peripheral_28K/APP/peripheral_main.c @@ -868,7 +868,7 @@ static void opt_input_poll(void) if (OPT_IN1 == 0) { // 干接点接通 → 低电平 if (_opt_low_since == 0) { _opt_low_since = mstick(); - } else if (!_opt_armed && (mstick() - _opt_low_since >= 500)) { + } else if (!_opt_armed && (mstick() - _opt_low_since >= 100)) { // 100 tick × 5ms = 500ms _opt_armed = 1; // 满足 500ms, 等待上升沿 } } else { // 干接点断开 → 高电平