Z5_HA_K18
authorcheng <2393524978@qq.com>
Thu, 29 Jan 2026 03:55:59 +0000 (11:55 +0800)
committercheng <2393524978@qq.com>
Thu, 29 Jan 2026 03:55:59 +0000 (11:55 +0800)
2.sdk/sdk/gui/lv_watch/lv_apps/custom_function/heng_ai_user_info.c
2.sdk/sdk/gui/lv_watch/lv_apps/dial/dial.h
2.sdk/sdk/gui/lv_watch/lv_apps/dial/dial_element.c

index 1aedbb2..c0b43ec 100644 (file)
@@ -291,7 +291,7 @@ void mmi_hengai_user_info_setting_birth_date_btn_event_cb(lv_obj_t * obj, lv_eve
                return;
        
        lv_obj_t * label = NULL;
-       char temp_str[4] = {0};
+       char temp_str[16] = {0};
        //hal_rtc_t cur_time = {0};
        
        //Hal_Rtc_Gettime(&cur_time);
@@ -377,7 +377,7 @@ void mmi_hengai_user_info_setting_birth_date_cont(lv_hengai_user_info_ext_t * ex
 
        lv_obj_t * label = NULL;
        lv_obj_t * imgbtn = NULL;
-       char temp_str[8] = {0};
+       char temp_str[16] = {0};
        
        // year
        //label = lv_label_create(cont, NULL);
@@ -499,7 +499,7 @@ void mmi_hengai_user_info_setting_height_btn_event_cb(lv_obj_t * obj, lv_event_t
                return;
        
        lv_obj_t * label = NULL;
-       char temp_str[4] = {0};
+       char temp_str[16] = {0};
        
        uint32_t free_num = lv_watch_get_free_num(obj);
        if(0 == free_num) // hundred up
@@ -558,7 +558,7 @@ void mmi_hengai_user_info_setting_height_cont(lv_hengai_user_info_ext_t * ext)
 
        lv_obj_t * label = NULL;
        lv_obj_t * imgbtn = NULL;
-       char temp_str[4] = {0};
+       char temp_str[16] = {0};
        
        // hundred
        imgbtn = lv_imgbtn_create(cont, NULL);
@@ -650,7 +650,7 @@ void mmi_hengai_user_info_setting_weight_btn_event_cb(lv_obj_t * obj, lv_event_t
                return;
        
        lv_obj_t * label = NULL;
-       char temp_str[4] = {0};
+       char temp_str[16] = {0};
        
        uint32_t free_num = lv_watch_get_free_num(obj);
        if(0 == free_num) // hundred up
@@ -708,7 +708,7 @@ void mmi_hengai_user_info_setting_weight_cont(lv_hengai_user_info_ext_t * ext)
 
        lv_obj_t * label = NULL;
        lv_obj_t * imgbtn = NULL;
-       char temp_str[4] = {0};
+       char temp_str[16] = {0};
        
        // hundred
        imgbtn = lv_imgbtn_create(cont, NULL);
index 1e189be..93647a8 100644 (file)
@@ -155,11 +155,17 @@ enum {
     IMG_TYPE_SLEEP_QUALITY_VALUE,//111
 
     IMG_TYPE_PRESSURE = ELEMENT_TYPE_PRESSURE * 10,         //120
-    IMG_TYPE_PRESSURE_HUNDRED,      //121
-    IMG_TYPE_PRESSURE_TENS,         //122
-    IMG_TYPE_PRESSURE_UNIT,         //123
-    IMG_TYPE_PRESSURE_KPA,          //124
-    IMG_TYPE_PRESSURE_LEVEL,        //125
+    //IMG_TYPE_PRESSURE_HUNDRED,      //121
+    //IMG_TYPE_PRESSURE_TENS,         //122
+    //IMG_TYPE_PRESSURE_UNIT,         //123
+    //IMG_TYPE_PRESSURE_KPA,          //124
+    //IMG_TYPE_PRESSURE_LEVEL,        //125
+       IMG_TYPE_PRESSURE_H_HUNDRED,      //121
+       IMG_TYPE_PRESSURE_H_TEN,         //122
+       IMG_TYPE_PRESSURE_H_DIGIT,         //123
+       IMG_TYPE_PRESSURE_L_HUNDRED,      //124
+       IMG_TYPE_PRESSURE_L_TEN,         //125
+       IMG_TYPE_PRESSURE_L_DIGIT,         //126
 
     IMG_TYPE_HEART_RATE = ELEMENT_TYPE_HEART_RATE * 10,      //130
     IMG_TYPE_HEART_RATE_HUNDRED,    //131
index 1d2e43b..4e2f91a 100644 (file)
@@ -781,7 +781,7 @@ static void dial_update_canvas_img(watch_element_base_t * base)
     app_adaptor_weather_t weather;
     app_adaptor_pedometer_record_t record;
     //app_adaptor_health_info_t health;
-       //mmi_health_info_t health_info = {0};
+       nv_watch_health_info_t health_info = {0};
     void * sub_img = NULL;
     int16_t angle = 0;
     hal_rtc_t tm;
@@ -802,7 +802,7 @@ static void dial_update_canvas_img(watch_element_base_t * base)
         || ELEMENT_TYPE_PRESSURE == base->element_type || ELEMENT_TYPE_TEMPERATURE == base->element_type || ELEMENT_TYPE_HAPPINESS == base->element_type)
     {
         //app_adaptor_get_health_info_req(&health);
-               //mmi_health_info_get(&health_info);
+               mmi_health_info_get(&health_info);
     }
 
     dial_get_element_pos(base->element_type, &pos);
@@ -1063,33 +1063,50 @@ static void dial_update_canvas_img(watch_element_base_t * base)
                 //if(sub_img)
                 //    dial_update_canvas(sub_img, 0, pos.x + img_dsc->img_pos.x, pos.y + img_dsc->img_pos.y);
                 break;
-            case IMG_TYPE_PRESSURE_HUNDRED:
-                //sub_img = dial_get_sub_img(img_dsc, health.pressure / 100);
-                //if(sub_img)
-                //    dial_update_canvas(sub_img, 0, pos.x + img_dsc->img_pos.x, pos.y + img_dsc->img_pos.y);
-                break;
-            case IMG_TYPE_PRESSURE_TENS:
-                //sub_img = dial_get_sub_img(img_dsc, (health.pressure % 100) / 10);
-                //if(sub_img)
-                //    dial_update_canvas(sub_img, 0, pos.x + img_dsc->img_pos.x, pos.y + img_dsc->img_pos.y);
-                break;
-            case IMG_TYPE_PRESSURE_UNIT:
-                //sub_img = dial_get_sub_img(img_dsc, health.pressure % 10);
-                //if(sub_img)
-                //    dial_update_canvas(sub_img, 0, pos.x + img_dsc->img_pos.x, pos.y + img_dsc->img_pos.y);
-                break;
-            case IMG_TYPE_PRESSURE_LEVEL:
-                //if(health.pressure >= PRESSURE_LEVEL_HIGH)
-                //    sub_img = dial_get_sub_img(img_dsc, 0);
-                //else if(health.pressure < PRESSURE_LEVEL_HIGH && health.pressure >= PRESSURE_LEVEL_MEDIUM)
-                //    sub_img = dial_get_sub_img(img_dsc, 1);
-                //else if(health.pressure < PRESSURE_LEVEL_MEDIUM && health.pressure >= PRESSURE_LEVEL_LOW)
-                //    sub_img = dial_get_sub_img(img_dsc, 2);
-                //else
-                //    sub_img = dial_get_sub_img(img_dsc, 3);
-                //if(sub_img)
-                //    dial_update_canvas(sub_img, 0, pos.x + img_dsc->img_pos.x, pos.y + img_dsc->img_pos.y);
-                break;
+
+               case IMG_TYPE_PRESSURE_H_HUNDRED:
+                       sub_img = dial_get_sub_img(img_dsc, health_info.blood_high_value / 100);
+                       if(sub_img)
+                               dial_update_canvas(sub_img, 0, pos.x + img_dsc->img_pos.x, pos.y + img_dsc->img_pos.y);
+                       break;
+               case IMG_TYPE_PRESSURE_H_TEN:
+                       if(0 == health_info.blood_high_value)
+                               sub_img = dial_get_sub_img(img_dsc, 10);
+                       else
+                               sub_img = dial_get_sub_img(img_dsc, (health_info.blood_high_value % 100) / 10);
+                       if(sub_img)
+                               dial_update_canvas(sub_img, 0, pos.x + img_dsc->img_pos.x, pos.y + img_dsc->img_pos.y);
+                       break;
+               case IMG_TYPE_PRESSURE_H_DIGIT:
+                       if(0 == health_info.blood_high_value)
+                               sub_img = dial_get_sub_img(img_dsc, 10);
+                       else
+                               sub_img = dial_get_sub_img(img_dsc, (health_info.blood_high_value % 100) % 10);
+                       if(sub_img)
+                               dial_update_canvas(sub_img, 0, pos.x + img_dsc->img_pos.x, pos.y + img_dsc->img_pos.y);
+                       break;
+               case IMG_TYPE_PRESSURE_L_HUNDRED:
+                       sub_img = dial_get_sub_img(img_dsc, health_info.blood_low_value / 100);
+                       if(sub_img)
+                               dial_update_canvas(sub_img, 0, pos.x + img_dsc->img_pos.x, pos.y + img_dsc->img_pos.y);
+                       break;
+               case IMG_TYPE_PRESSURE_L_TEN:
+                       if(0 == health_info.blood_low_value)
+                               sub_img = dial_get_sub_img(img_dsc, 10);
+                       else
+                               sub_img = dial_get_sub_img(img_dsc, (health_info.blood_low_value % 100) / 10);
+                       if(sub_img)
+                               dial_update_canvas(sub_img, 0, pos.x + img_dsc->img_pos.x, pos.y + img_dsc->img_pos.y);
+                       break;
+               case IMG_TYPE_PRESSURE_L_DIGIT:
+                       if(0 == health_info.blood_low_value)
+                               sub_img = dial_get_sub_img(img_dsc, 10);
+                       else
+                               sub_img = dial_get_sub_img(img_dsc, (health_info.blood_low_value % 100) % 10);
+                       if(sub_img)
+                               dial_update_canvas(sub_img, 0, pos.x + img_dsc->img_pos.x, pos.y + img_dsc->img_pos.y);
+                       break;
+                       
             case IMG_TYPE_TIME_CENTER_DOT:
                 sub_img = dial_get_sub_img(img_dsc, 0);
                 if(sub_img)