mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Fixed bug with battery discharge sensor
This commit is contained in:
@@ -100,7 +100,7 @@ public class HardwareMonitor
|
||||
ct.Dispose();
|
||||
|
||||
var cb = new PerformanceCounter("Power Meter", "Power", "Power Meter (0)", true);
|
||||
batteryDischarge = ct.NextValue() / 1000;
|
||||
batteryDischarge = cb.NextValue() / 1000;
|
||||
cb.Dispose();
|
||||
}
|
||||
catch
|
||||
|
||||
@@ -345,7 +345,7 @@ namespace GHelper
|
||||
if (HardwareMonitor.cpuTemp > 0)
|
||||
cpuTemp = ": " + Math.Round((decimal)HardwareMonitor.cpuTemp).ToString() + "°C - ";
|
||||
|
||||
if (HardwareMonitor.batteryDischarge > 1)
|
||||
if (HardwareMonitor.batteryDischarge > 0)
|
||||
battery = "Discharging: " + Math.Round((decimal)HardwareMonitor.batteryDischarge, 1).ToString() + "W";
|
||||
|
||||
Program.settingsForm.BeginInvoke(delegate
|
||||
|
||||
Reference in New Issue
Block a user