|
|
|
@ -438,17 +438,17 @@ bool CPhoneDevice::QuerySystemProperties(std::map<std::string, std::string>& pro
|
|
|
|
|
else if (it->first == (PROP_BATTERY_VOLTAGE))
|
|
|
|
|
{
|
|
|
|
|
// double val = GpioControl::getBatteryVoltage() * 3.0 / 1000.0; // // BatVol
|
|
|
|
|
double val = -1; // // BatVol
|
|
|
|
|
int val = -1; // // BatVol
|
|
|
|
|
char str[32] = { 0 };
|
|
|
|
|
for (int idx = 0; idx < 3; idx++)
|
|
|
|
|
{
|
|
|
|
|
val = GpioControl::getBatteryVoltage() / 1000.0; // // BatVol
|
|
|
|
|
val = GpioControl::getBatteryVoltage(); // // BatVol
|
|
|
|
|
if (val >= 0)
|
|
|
|
|
{
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
snprintf(str, sizeof(str), "%.1f", val);
|
|
|
|
|
snprintf(str, sizeof(str), "%.1f", val / 1000.0);
|
|
|
|
|
it->second = str;
|
|
|
|
|
}
|
|
|
|
|
else if (it->first == (PROP_BATTERY_CURRENT))
|
|
|
|
|