get rid of macro, use inline func
This commit is contained in:
8
main.cpp
8
main.cpp
@@ -49,7 +49,7 @@ void signalHandler(int) {
|
||||
}
|
||||
|
||||
void hassThread(std::stop_token st, Sensors* s) {
|
||||
applog(LOG::INF, "Thread started");
|
||||
applog(LOG::START, "Thread started");
|
||||
HomeAssistant pc_power("home.drath.win", "sensor.gniazdko_komputer_moc");
|
||||
|
||||
pc_power.connect();
|
||||
@@ -66,7 +66,7 @@ void hassThread(std::stop_token st, Sensors* s) {
|
||||
}
|
||||
|
||||
void sensorsThread(std::stop_token st, Sensors* s) {
|
||||
applog(LOG::INF, "Thread started, poll interval {} ms", LCD_INTERVAL_MS);
|
||||
applog(LOG::START, "Thread started, poll interval {} ms", LCD_INTERVAL_MS);
|
||||
cpu::detectHwmon(&s->cpu, "0000:00:18.3");
|
||||
gpu::detectHwmon(&s->gpu, "0000:0b:00.0");
|
||||
sys::detectHwmon(&s->sys, "nct6775.656");
|
||||
@@ -94,7 +94,7 @@ void sensorsThread(std::stop_token st, Sensors* s) {
|
||||
}
|
||||
|
||||
void displayThread(std::stop_token st, Sensors* s) {
|
||||
applog(LOG::INF, "Thread started");
|
||||
applog(LOG::START, "Thread started");
|
||||
// init internal variables of LCDDisplay class
|
||||
LCDDisplay lcd(LCD_PORT);
|
||||
|
||||
@@ -165,7 +165,7 @@ void displayThread(std::stop_token st, Sensors* s) {
|
||||
}
|
||||
|
||||
int main() {
|
||||
applog(LOG::START, "Program started"); // to make logs clearer
|
||||
applog(LOG::START, "Application started", __FILE__); // to make logs clearer
|
||||
std::signal(SIGINT, signalHandler);
|
||||
std::signal(SIGTERM, signalHandler);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user