This commit is contained in:
helloyifa 2025-07-05 14:54:27 +08:00
commit d239904ff7

View File

@ -318,7 +318,7 @@ static void shake_arithmetic_task_handler(void *param)
signed short x;//, y, z; signed short x;//, y, z;
int diff_x ;//,diff_y, diff_z; int diff_x ;//,diff_y, diff_z;
const int diff_threshold = 1000; // 差值阈值,可根据实际情况调整 const int diff_threshold = 1100; // 差值阈值,可根据实际情况调整
const int strong_tap_threshold = 9000; 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__); // 添加差值超过阈值的日志 // os_printf("%s: Difference exceeds the threshold, checking time condition.\n", __func__); // 添加差值超过阈值的日志
if ((shake_info.last_time + shake_t_l_ms) < timestmp) { if ((shake_info.last_time + shake_t_l_ms) < timestmp) {
shake_info.last_time = timestmp; shake_info.last_time = timestmp;
rtos_delay_milliseconds(180);//过滤刚语音会闪灯
if(first == 1 && get_binary_data_status() == 1){ if(first == 1 && get_binary_data_status() == 1){
// turnonall_Led(1); // turnonall_Led(1);
// os_printf("spi_led_init_gsensor\r\n"); // os_printf("spi_led_init_gsensor\r\n");
os_printf("========SHAKE========SHAKE========SHAKE========\r\n"); os_printf("========SHAKE========SHAKE========SHAKE========\r\n");