align structs, idk if it does anything
This commit is contained in:
@@ -17,7 +17,7 @@ struct sensors {
|
||||
sys::sysSensors sys;
|
||||
cpu::cpuSensors cpu;
|
||||
gpu::gpuSensors gpu;
|
||||
float hass_state = 0.0f;
|
||||
double hass_state = 0.0f;
|
||||
std::mutex mtx; // making sure the struct isnt accessed by multiple threads at once
|
||||
};
|
||||
|
||||
|
||||
@@ -8,19 +8,21 @@
|
||||
|
||||
namespace cpu {
|
||||
|
||||
struct cpuSensors {
|
||||
std::string hwmon;
|
||||
bool zenpower = false;
|
||||
enum Module : uint8_t { unknown, k10temp, zenpower };
|
||||
|
||||
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;
|
||||
struct cpuSensors {
|
||||
Module module = unknown;
|
||||
std::byte _pad[1];
|
||||
int16_t tdie = 0;
|
||||
int16_t tctl = 0;
|
||||
int16_t tccd1 = 0;
|
||||
// double pcore = 0.0;
|
||||
// double psoc = 0.0;
|
||||
float ptotal = 0.0;
|
||||
// double vcore = 0.0;
|
||||
// double vsoc = 0.0;
|
||||
uint32_t avg_freq = 0;
|
||||
std::string hwmon;
|
||||
};
|
||||
|
||||
void detectHwmon(cpuSensors* target, const std::string& pci);
|
||||
|
||||
@@ -9,10 +9,10 @@
|
||||
namespace gpu {
|
||||
|
||||
struct gpuSensors {
|
||||
std::string hwmon;
|
||||
bool hasGpuMetrics = false;
|
||||
uint64_t vram_used = 0;
|
||||
// uint64_t vram_total = 0;
|
||||
|
||||
double vcore = 0.0f;
|
||||
float vcore = 0.0f;
|
||||
|
||||
uint16_t clock_core = 0;
|
||||
uint16_t clock_mem = 0;
|
||||
@@ -31,12 +31,13 @@ struct gpuSensors {
|
||||
uint8_t temp_vrm_soc = 0;
|
||||
uint8_t temp_vrm_mem = 0;
|
||||
|
||||
bool hasGpuMetrics = false;
|
||||
|
||||
uint8_t usage_core = 0;
|
||||
uint8_t usage_media = 0;
|
||||
uint8_t usage_umc = 0;
|
||||
|
||||
uint64_t vram_used = 0;
|
||||
// uint64_t vram_total = 0;
|
||||
std::string hwmon;
|
||||
};
|
||||
|
||||
void detectHwmon(gpuSensors* target, const std::string& pci);
|
||||
|
||||
@@ -12,7 +12,8 @@ constexpr char wdays[][4] = {"Nie", "Pon", "Wto", "Sro", "Czw", "Pia", "Sob"};
|
||||
struct sysSensors {
|
||||
std::string hwmon;
|
||||
uint16_t fan_speed[2] = {0}; // left and right cpu fans
|
||||
uint8_t t_sensor = 0; // ntc temp sensor
|
||||
int16_t t_sensor = 0; // ntc temp sensor
|
||||
std::byte _pad[2];
|
||||
};
|
||||
|
||||
struct Memory {
|
||||
|
||||
Reference in New Issue
Block a user