From: CCC <2393524978@qq.com> Date: Tue, 30 May 2023 08:05:54 +0000 (+0800) Subject: xiugai X-Git-Url: http://git.snicker.com.cn/?a=commitdiff_plain;h=2aa83a1453782455ce494e46b409394dc2e2d9a5;p=mirrors%2FASR3603_Z5.git xiugai --- diff --git a/2.sdk/gui/lv_drivers/indev/ACNT117.c b/2.sdk/gui/lv_drivers/indev/ACNT117.c index c80507b6..1d4a299f 100644 --- a/2.sdk/gui/lv_drivers/indev/ACNT117.c +++ b/2.sdk/gui/lv_drivers/indev/ACNT117.c @@ -126,7 +126,7 @@ void acnt117_measure_stop(void) } float acnt117_get_body_temperature(void) { - printf("[@CHENG_DEBUG][%s][%d]: %f\n", __FUNCTION__, __LINE__, temp); + printf("[@CHENG_DEBUG][%s][%d]: %d\n", __FUNCTION__, __LINE__, (uint16_t)(temp*100)); return temp; } diff --git a/2.sdk/gui/lv_watch/lv_apps/health_measure/health_measure.c b/2.sdk/gui/lv_watch/lv_apps/health_measure/health_measure.c index 683e35a0..bc042684 100644 --- a/2.sdk/gui/lv_watch/lv_apps/health_measure/health_measure.c +++ b/2.sdk/gui/lv_watch/lv_apps/health_measure/health_measure.c @@ -134,11 +134,10 @@ bool mmi_health_measure_temperature_data_process(float * body_value, float * wri #else mmi_tsensor_body_value_get(&t_body_value); - t_body_value = t_wrist_value; t_wrist_value = t_body_value - 10.0; #endif - HEALTH_MEASURE_DEBUG_PRINTF("[@CHENG_DEBUG][%s][%d]: %f,%f\n", __FUNCTION__, __LINE__, t_body_value, t_wrist_value); + HEALTH_MEASURE_DEBUG_PRINTF("[@CHENG_DEBUG][%s][%d]: %d,%d\n", __FUNCTION__, __LINE__, (uint16_t)(t_body_value*100), (uint16_t)(t_wrist_value*100)); * body_value = t_body_value; * wrist_value = t_wrist_value; diff --git a/2.sdk/gui/lv_watch/lv_apps/health_measure/health_temperature.c b/2.sdk/gui/lv_watch/lv_apps/health_measure/health_temperature.c index 46a22e53..a1e26a91 100644 --- a/2.sdk/gui/lv_watch/lv_apps/health_measure/health_temperature.c +++ b/2.sdk/gui/lv_watch/lv_apps/health_measure/health_temperature.c @@ -112,9 +112,13 @@ static void health_temperature_measure_cycle_timeout(void * para) float value = 0.0; mmi_health_measure_temperature_data_ui_get(&value, NULL); - if(value) + if(0.0 != value) { - sprintf(ext->body_value, "%.1f %s", value, lang_get_text_by_id(WATCH_TEXT_ID_TEMPERATURE_UNIT)); // 0x2103 + uint8_t value1 = 0, value2 = 0; + + value1 = (uint8_t)value; + value2 = (uint8_t)((value - value1) * 10); + sprintf(ext->body_value, "%d.%d %s", value1, value2, lang_get_text_by_id(WATCH_TEXT_ID_TEMPERATURE_UNIT)); // 0x2103 } ext->measure_state = STATE_TEMPERATURE_MEASURING; }