move hass config to main
This commit is contained in:
@@ -21,6 +21,9 @@ class Application {
|
||||
std::string sys_sensor;
|
||||
std::string sys_ifname;
|
||||
std::string home_dir;
|
||||
std::string hass_url;
|
||||
std::string hass_entity;
|
||||
std::string hass_token;
|
||||
};
|
||||
|
||||
explicit Application(Config config);
|
||||
@@ -30,7 +33,7 @@ class Application {
|
||||
private:
|
||||
struct Sensors {
|
||||
sys::TimeDate td;
|
||||
double avg[3] = {0.0f};
|
||||
double loadavg[3] = {0.0f};
|
||||
sys::Memory ram;
|
||||
sys::Disk home;
|
||||
sys::Network net;
|
||||
@@ -38,11 +41,11 @@ class Application {
|
||||
cpu::cpuSensors cpu;
|
||||
gpu::gpuSensors gpu;
|
||||
double hass_state = 0.0f;
|
||||
std::mutex mtx; // making sure the struct isnt accessed by multiple threads at once
|
||||
};
|
||||
|
||||
struct Control {
|
||||
std::binary_semaphore display{0};
|
||||
std::mutex sensors; // making sure the sensors struct isnt accessed by multiple threads at once
|
||||
sigset_t sigset;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user