From 42ddd38babc97adb6bc1c9c9a57fea98f84862b1 Mon Sep 17 00:00:00 2001 From: Matthew Date: Wed, 12 Jun 2024 15:54:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/cpp/PhoneDevice.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/app/src/main/cpp/PhoneDevice.cpp b/app/src/main/cpp/PhoneDevice.cpp index 108817c4..2d047620 100644 --- a/app/src/main/cpp/PhoneDevice.cpp +++ b/app/src/main/cpp/PhoneDevice.cpp @@ -602,13 +602,6 @@ bool CPhoneDevice::QuerySystemProperties(std::map& pro { it->second = std::to_string(android_os_Process_getTotalMemory()); // Unit: M } - else if (it->first == (PROP_CHARGING_VOLTAGE)) - { - double val = GpioControl::getChargingVoltage() / 200.0; // ChargeVol *5/1000 - char str[32] = { 0 }; - snprintf(str, sizeof(str), "%.1f", val); - it->second = str; - } else if (it->first == (PROP_LIGHTDEPENDENT_RESISTOR)) { int val = GpioControl::getLightAdc(); @@ -622,7 +615,7 @@ bool CPhoneDevice::QuerySystemProperties(std::map& pro { it->second = std::to_string(GpioControl::getChargingPower()); } - else if (it->first == (PROP_CHARGING_BUS_VOL)) + else if (it->first == (PROP_CHARGING_BUS_VOL) || it->first == (PROP_CHARGING_VOLTAGE)) { double val = -1; char str[32] = { 0 };