Compare commits
No commits in common. "a69a3cb1542718beee2ddf113d5434d113488cdd" and "8cf66774b8c717219e78270e8c52b7a594a6a99e" have entirely different histories.
a69a3cb154
...
8cf66774b8
@ -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 = 1100; // 差值阈值,可根据实际情况调整
|
const int diff_threshold = 1000; // 差值阈值,可根据实际情况调整
|
||||||
|
|
||||||
|
|
||||||
const int strong_tap_threshold = 9000;
|
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_x = abs(x - prev_x);
|
||||||
// diff_y = abs(y - prev_y);
|
// diff_y = abs(y - prev_y);
|
||||||
//diff_z = abs(z - prev_z);
|
//diff_z = abs(z - prev_z);
|
||||||
// os_printf("%s: x = %d,diff_x = %d \n",
|
// os_printf("%s: x = %d,diff_x = %d \n",
|
||||||
// __func__, x, diff_x);
|
// __func__, x, diff_x);
|
||||||
|
|
||||||
// os_printf("%s: x = %d,diff_x = %d y = %d,diff_y = %d z = %d,diff_z = %d\n",
|
// 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);
|
// __func__, x, diff_x,y,diff_y,z,diff_z);
|
||||||
@ -364,10 +364,7 @@ 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");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user