From 13261696ed1c02586c4d1019efa7f1144830827e Mon Sep 17 00:00:00 2001 From: penglei <1624952103@qq.com> Date: Mon, 8 Dec 2025 14:59:35 +0800 Subject: [PATCH] =?utf8?q?=E7=94=B5=E6=B1=A0=E4=BA=A7=E6=B5=8BUI=E5=A2=9E?= =?utf8?q?=E5=8A=A0NTC=E6=B8=A9=E5=BA=A6=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- code/sdk/zhihui/UI/producttest/src/testchanging.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/code/sdk/zhihui/UI/producttest/src/testchanging.cpp b/code/sdk/zhihui/UI/producttest/src/testchanging.cpp index 20a2ccb33..1f58c022b 100644 --- a/code/sdk/zhihui/UI/producttest/src/testchanging.cpp +++ b/code/sdk/zhihui/UI/producttest/src/testchanging.cpp @@ -212,14 +212,19 @@ namespace OHOS float voltage = 0.0F; + float bat_temp = 0.0F; + float pcb_temp = 0.0F; uint8_t power = 0; +#ifdef SUPPORT_BATTERY_SERVICE power = battery_get_voltage(&voltage); + battery_get_pcb_temp(&pcb_temp); + battery_get_battery_temp(&bat_temp); +#endif + char battery_buf[64]={0}; - char battery_buf[32]={0}; - - sprintf_s(battery_buf,32,"power:%d\nvoltage:%.2f",power,voltage); + sprintf_s(battery_buf,64,"power:%d\nvoltage:%.2f\nbat_temp:%.2f\npcb_temp:%.2f",power,voltage,bat_temp,pcb_temp); - charnge_label= testAboutView::GetInstance()->init_title(100,250,battery_buf); + charnge_label= testAboutView::GetInstance()->init_title(70,250,battery_buf); testCHANINGScrollView->Add(charnge_label); #if ENABLE_TEST_RESULT_BUTTONS -- 2.17.1