hengai
authorCCC <2393524978@qq.com>
Fri, 1 Dec 2023 02:46:36 +0000 (10:46 +0800)
committerCCC <2393524978@qq.com>
Fri, 1 Dec 2023 02:46:36 +0000 (10:46 +0800)
2.sdk/sdk/gui/lv_watch/lv_apps/custom_function/heng_ai_sleep_activation.c

index 0c05ac1..b0d240a 100644 (file)
@@ -207,9 +207,9 @@ static void mmi_hengai_gsensor_data_get(uint32_t para)
        uint8_t i = 0;
        
        get_Gsensor_fifo_xyz(t_mems_data);
-       for(i = 0; i < 25; i++) // 25 sets data per 500ms
+       for(i = 0; i < 30; i++) // 30 sets data per 600ms
        {
-               uint16_t index = s_hengai_sleep_gsensor_counter * 25 + i;
+               uint16_t index = s_hengai_sleep_gsensor_counter * 30 + i;
                
                s_hengai_sleep_gsensor_data[index].x = *(t_mems_data + i*3);
                s_hengai_sleep_gsensor_data[index].y = *(t_mems_data + i*3 + 1);
@@ -217,7 +217,7 @@ static void mmi_hengai_gsensor_data_get(uint32_t para)
        }
        
        s_hengai_sleep_gsensor_counter++;
-       if((60 * 2) <= s_hengai_sleep_gsensor_counter) // 1 minute:500ms*2*60
+       if(100 <= s_hengai_sleep_gsensor_counter) // 1 minute:600ms*100
        {
                uos_timer_stop(s_hengai_sleep_gsensor_timer_id);
                s_hengai_sleep_gsensor_counter = 0;
@@ -227,7 +227,7 @@ static void mmi_hengai_gsensor_data_get(uint32_t para)
        else
        {
                uos_timer_stop(s_hengai_sleep_gsensor_timer_id);
-               uos_timer_start(s_hengai_sleep_gsensor_timer_id, MS_TO_TICKS(500), 0, mmi_hengai_gsensor_data_get, NULL);
+               uos_timer_start(s_hengai_sleep_gsensor_timer_id, MS_TO_TICKS(600), 0, mmi_hengai_gsensor_data_get, NULL);
        }
 }
 
@@ -246,7 +246,7 @@ void mmi_hengai_get_sleep_data_start(void)
        //³õʼ»¯sdata
     init_sleep_data(&s_hengai_sdata);
     
-       uos_timer_start(s_hengai_sleep_gsensor_timer_id, MS_TO_TICKS(500), 0, mmi_hengai_gsensor_data_get, NULL);
+       uos_timer_start(s_hengai_sleep_gsensor_timer_id, MS_TO_TICKS(600), 0, mmi_hengai_gsensor_data_get, NULL);
 }
 
 void mmi_hengai_get_sleep_data_stop(void)