Support showing current temperatures

This commit is contained in:
Kamil Trzciński 2022-11-12 10:14:09 +01:00
parent d073ab0ff6
commit e25e284e10
11 changed files with 357 additions and 27 deletions

View file

@ -34,15 +34,17 @@ namespace FanControl
IsMotherboardEnabled = true,
IsControllerEnabled = true,
IsNetworkEnabled = true,
IsStorageEnabled = true
IsStorageEnabled = true,
IsPsuEnabled = true,
IsBatteryEnabled = true
};
computer.Open();
computer.Accept(new UpdateVisitor());
//computer.Accept(new UpdateVisitor());
foreach (IHardware hardware in computer.Hardware)
{
Console.WriteLine("Hardware: {0}", hardware.Name);
Console.WriteLine("Hardware: {0}. Type: {1}", hardware.Name, hardware.HardwareType);
foreach (IHardware subhardware in hardware.SubHardware)
{
@ -50,13 +52,13 @@ namespace FanControl
foreach (ISensor sensor in subhardware.Sensors)
{
Console.WriteLine("\t\tSensor: {0}, value: {1}", sensor.Name, sensor.Value);
Console.WriteLine("\t\tSensor: {0}, value: {1}, type: {2}", sensor.Name, sensor.Value, sensor.SensorType);
}
}
foreach (ISensor sensor in hardware.Sensors)
{
Console.WriteLine("\tSensor: {0}, value: {1}", sensor.Name, sensor.Value);
Console.WriteLine("\tSensor: {0}, value: {1}, type: {2}", sensor.Name, sensor.Value, sensor.SensorType);
}
}
@ -64,7 +66,7 @@ namespace FanControl
}
static void ConsoleMain(string[] args)
{
// Monitor();
Monitor();
while (true)
{