Fixed charging status indicator reporting incorrect current values

This commit is contained in:
Gus
2019-07-27 09:35:02 +02:00
parent 5dae1da560
commit b56595ac27
3 changed files with 10 additions and 5 deletions
+7 -1
View File
@@ -189,7 +189,13 @@ namespace WPinternals
eMMC = Manufacturer + " " + MemSizeDouble.ToString() + " GB";
SamsungWarningVisible = (MID == 0x0015);
ChargingStatus = CurrentModel.ReadCurrentChargeLevel() + "% - " + CurrentModel.ReadCurrentChargeCurrent() + " mA";
int chargecurrent = CurrentModel.ReadCurrentChargeCurrent().Value;
if (chargecurrent < 0)
ChargingStatus = CurrentModel.ReadCurrentChargeLevel() + "% - " + ((-1) * CurrentModel.ReadCurrentChargeCurrent()) + " mA (discharging)";
else
ChargingStatus = CurrentModel.ReadCurrentChargeLevel() + "% - " + CurrentModel.ReadCurrentChargeCurrent() + " mA (charging)";
LogFile.Log("Charging status: " + ChargingStatus);
PhoneInfo Info = CurrentModel.ReadPhoneInfo(true);