charttiness

This commit is contained in:
Drath
2025-09-18 23:01:58 +02:00
parent e2895ff80f
commit 057b2ccfe8

View File

@@ -64,7 +64,7 @@ void hassThread(std::stop_token st, Sensors* s) {
}
void sensorsThread(std::stop_token st, Sensors* s) {
// std::println("[Thread] Starting sensors_thread, pid {}, poll interval {} ms", gettid(), LCD_INTERVAL_MS);
std::println("[Thread] Starting sensors_thread, pid {}, poll interval {} ms", gettid(), LCD_INTERVAL_MS);
cpu::detectHwmon(&s->cpu, "0000:00:18.3");
gpu::detectHwmon(&s->gpu, "0000:08:00.0");
@@ -87,7 +87,7 @@ void sensorsThread(std::stop_token st, Sensors* s) {
}
void displayThread(std::stop_token st, Sensors* s) {
// std::println("[Thread] Starting display_thread, pid {}", gettid());
std::println("[Thread] Starting display_thread, pid {}", gettid());
LCDDisplay lcd(LCD_PORT);
lcd.setContrast(LCD_CONTRAST);
@@ -134,10 +134,9 @@ void displayThread(std::stop_token st, Sensors* s) {
int main(int argc, char* argv[]) {
std::signal(SIGINT, sighandler);
std::signal(SIGTERM, sighandler);
// std::println("[Thread] Main thread, pid {}", gettid());
Sensors* pSensors = new Sensors;
// std::println("sensors addr: {}\nsensors.gpu addr", (void*)pSensors, pSensors->gpu);
std::println("[main] size of sensor struct is {} bytes", sizeof(Sensors));
std::vector<std::function<void(std::stop_token st, Sensors * s)>> funcs = {displayThread, hassThread, sensorsThread};
@@ -156,6 +155,5 @@ int main(int argc, char* argv[]) {
}
delete pSensors;
std::println("Main thread exiting");
return 0;
}
}