mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Added battery health reading to below the battery charge limiter bar.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user