public PiInfo(float cputemp, float cpuusg, long totalMemory, float usedMemoryPercent, DHTInfo dht, Dictionary <int, GPIOValue> gpios = null) { PiFound = true; Gpio = gpios ?? new Dictionary <int, GPIOValue>(); Cpu = new CpuInfo(cputemp, cpuusg); Memory = new MemoryInfo(totalMemory, usedMemoryPercent); Dht = dht; }
} // in % public PiProblemEventArgs(CpuInfo cpu, MemoryInfo mem) { CpuUsage = cpu.Usage; FreeMemory = 100 - mem.UsedPercent; Temperature = cpu.Temperature; }