yuge overhaul, threads, hass, rewrote display, hwmons, bunc of shit

This commit is contained in:
Drath
2025-09-11 17:56:40 +02:00
parent 3153b1dc1b
commit 7b4791395e
12 changed files with 411 additions and 255 deletions

33
include/cpu.hpp Normal file
View File

@@ -0,0 +1,33 @@
#ifndef CPU_HPP
#define CPU_HPP
#include <cstdint>
#include <filesystem>
#include <print>
#include <string>
#include <utils.hpp>
#define N_CPU 16
struct cpu_hwmon_t {
std::string path = "";
bool zenpower = false;
};
struct cpu_t {
int tdie = 0;
int tctl = 0;
int tccd1 = 0;
double pcore = 0.0;
double psoc = 0.0;
double ptotal = 0.0;
double vcore = 0.0;
double vsoc = 0.0;
uint32_t avg_freq = 0;
};
cpu_t getCpu(cpu_hwmon_t hw);
cpu_hwmon_t detectCpuHwmon(std::string pci);
#endif