From: azao <821478748@qq.com> Date: Tue, 14 Oct 2025 08:30:30 +0000 (+0800) Subject: 解决由于之前双击判断出现的长按关机缺失问题 X-Git-Url: http://git.snicker.com.cn/?a=commitdiff_plain;h=d39720eef4958294720f9ae6a130b25c116449b5;p=mirrors%2FASR1603_G5.git 解决由于之前双击判断出现的长按关机缺失问题 --- diff --git a/2.sdk/project/K8/sdk/services/microPython/ports/quectel/core/ai_VC.py b/2.sdk/project/K8/sdk/services/microPython/ports/quectel/core/ai_VC.py index c782eae3..f12b601a 100644 --- a/2.sdk/project/K8/sdk/services/microPython/ports/quectel/core/ai_VC.py +++ b/2.sdk/project/K8/sdk/services/microPython/ports/quectel/core/ai_VC.py @@ -441,6 +441,9 @@ class AI_dev(Abstract): if self.press_count == 1: # 第一次按下 self.first_press_time = current_time # 记录第一次按下时间 + self.KeyAI_long_press = 0 + self.KeyAI_timer.start(100, 1, self.KeyAI_timer_cb) + self.KeyAI_timer_count = 0 self.AI_key_press() # 触发单击业务(无音频,音频确定后播放) # 启动定时器:超过阈值未第二次按下则判定为单击 self.is_double_timer.start(self.double_click_threshold, 0, self.is_double_judge)