From 3659f04c36ee35a744825b944e505a278e452bc3 Mon Sep 17 00:00:00 2001 From: dianke3yu <343528259@qq.com> Date: Sat, 5 Jul 2025 14:30:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8B=8D=E6=8B=8D=E7=81=AF=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E9=98=88=E5=80=BC=E5=A2=9E=E5=8A=A010%,=E5=BB=B6=E6=97=B6180s?= =?UTF-8?q?=E8=A6=81=E8=BF=87=E6=BB=A4=E6=8E=89=E6=94=BE=E5=A3=B0=E9=9F=B3?= =?UTF-8?q?=E5=BC=95=E8=B5=B7=E4=B8=89=E8=BD=B4=E9=97=AA=E7=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bk_idk/components/bk_gsensor/arithmetic_module.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/bk_aidk/bk_avdk/bk_idk/components/bk_gsensor/arithmetic_module.c b/bk_aidk/bk_avdk/bk_idk/components/bk_gsensor/arithmetic_module.c index 5496521a..40408fc9 100755 --- a/bk_aidk/bk_avdk/bk_idk/components/bk_gsensor/arithmetic_module.c +++ b/bk_aidk/bk_avdk/bk_idk/components/bk_gsensor/arithmetic_module.c @@ -318,7 +318,7 @@ static void shake_arithmetic_task_handler(void *param) signed short x;//, y, z; int diff_x ;//,diff_y, diff_z; - const int diff_threshold = 1000; // 差值阈值,可根据实际情况调整 + const int diff_threshold = 1100; // 差值阈值,可根据实际情况调整 const int strong_tap_threshold = 9000; @@ -352,8 +352,8 @@ static void shake_arithmetic_task_handler(void *param) diff_x = abs(x - prev_x); // diff_y = abs(y - prev_y); //diff_z = abs(z - prev_z); - // os_printf("%s: x = %d,diff_x = %d \n", - // __func__, x, diff_x); + // os_printf("%s: x = %d,diff_x = %d \n", + // __func__, x, diff_x); // os_printf("%s: x = %d,diff_x = %d y = %d,diff_y = %d z = %d,diff_z = %d\n", // __func__, x, diff_x,y,diff_y,z,diff_z); @@ -364,7 +364,10 @@ static void shake_arithmetic_task_handler(void *param) // os_printf("%s: Difference exceeds the threshold, checking time condition.\n", __func__); // 添加差值超过阈值的日志 if ((shake_info.last_time + shake_t_l_ms) < timestmp) { shake_info.last_time = timestmp; + rtos_delay_milliseconds(180);//过滤刚语音会闪灯 if(first == 1 && get_binary_data_status() == 1){ + + // turnonall_Led(1); // os_printf("spi_led_init_gsensor\r\n"); os_printf("========SHAKE========SHAKE========SHAKE========\r\n");