From 35b749f1a1af12d7fc59881df2296ed16b4543da Mon Sep 17 00:00:00 2001 From: BlueMatthew Date: Thu, 4 Jan 2024 17:57:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E6=A0=BC=E5=BC=8F=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/cpp/PhoneDevice.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/cpp/PhoneDevice.cpp b/app/src/main/cpp/PhoneDevice.cpp index 3ccfcca9..292e697d 100644 --- a/app/src/main/cpp/PhoneDevice.cpp +++ b/app/src/main/cpp/PhoneDevice.cpp @@ -355,7 +355,7 @@ bool CPhoneDevice::QuerySystemProperties(std::map& pro { double val = GpioControl::getChargingVoltage() / 200.0; // ChargeVol *5/1000 char str[32] = { 0 }; - snprintf(str, sizeof(str), "%.0f", val); + snprintf(str, sizeof(str), "%.1f", val); it->second = str; } else if (it->first == (PROP_CHARGING_CURRENT)) @@ -374,7 +374,7 @@ bool CPhoneDevice::QuerySystemProperties(std::map& pro { double val = GpioControl::getBatteryVoltage() * 3.0 / 1000.0; // // BatVol char str[32] = { 0 }; - snprintf(str, sizeof(str), "%.0f", val); + snprintf(str, sizeof(str), "%.1f", val); it->second = str; } else if (it->first == (PROP_BATTERY_CURRENT))