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);
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);
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
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);
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
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);
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
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;
|| 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);
//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)