Added battery health reading to below the battery charge limiter bar.

This commit is contained in:
IceStormNG
2023-07-20 14:52:17 +02:00
parent a4b44565ea
commit 584bd155d6
5 changed files with 287 additions and 206 deletions

View File

@@ -762,6 +762,7 @@ namespace GHelper
string cpuTemp = "";
string gpuTemp = "";
string battery = "";
string batteryHealth = "";
HardwareControl.ReadSensors();
@@ -773,6 +774,17 @@ namespace GHelper
else if (HardwareControl.batteryRate > 0)
battery = Properties.Strings.Charging + ": " + Math.Round((decimal)HardwareControl.batteryRate, 1).ToString() + "W";
if (HardwareControl.batteryWear == -1)
{
batteryHealth = Properties.Strings.BatteryHealth + ": " + "?";
}
else
{
batteryHealth = Properties.Strings.BatteryHealth + ": "
+ Math.Round((decimal)HardwareControl.batteryWear, 1).ToString() + "%";
}
if (HardwareControl.gpuTemp > 0)
{
gpuTemp = $": {HardwareControl.gpuTemp}°C";
@@ -787,6 +799,7 @@ namespace GHelper
labelMidFan.Text = "Mid" + HardwareControl.midFan;
labelBattery.Text = battery;
labelBatteryHealth.Text = batteryHealth;
});
string trayTip = "CPU" + cpuTemp + " " + HardwareControl.cpuFan;