拍拍灯判断阈值增加10%,延时180s要过滤掉放声音引起三轴闪灯

This commit is contained in:
dianke3yu 2025-07-05 14:30:16 +08:00
parent 52b9e4cd9d
commit 3659f04c36

View File

@ -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;
@ -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");