diff --git a/app/src/main/cpp/PhoneDevice.cpp b/app/src/main/cpp/PhoneDevice.cpp index 4452ef9b..2f22a189 100644 --- a/app/src/main/cpp/PhoneDevice.cpp +++ b/app/src/main/cpp/PhoneDevice.cpp @@ -422,7 +422,19 @@ bool CPhoneDevice::QuerySystemProperties(std::map& pro } else if (it->first == (PROP_CHARGING_BUS_VOL)) { - it->second = std::to_string(GpioControl::getChargingBusVoltage()); + double val = -1; + char str[32] = { 0 }; + for (int idx = 0; idx < 3; idx++) + { + val = GpioControl::getChargingBusVoltage(); + if (val < 0) + { + continue; + } + snprintf(str, sizeof(str), "%.1f", (val / 1000.0)); + it->second = str; + break; + } } else if (it->first == (PROP_BATTERY_VOLTAGE)) {