add some return values to some shit so it shuts down elegantly on crash
This commit is contained in:
@@ -34,7 +34,7 @@ class Application {
|
||||
|
||||
explicit Application(Config config);
|
||||
~Application();
|
||||
void Run();
|
||||
int Run();
|
||||
|
||||
private:
|
||||
struct Sensors {
|
||||
@@ -55,6 +55,8 @@ class Application {
|
||||
sigset_t sigset;
|
||||
};
|
||||
|
||||
pid_t m_mainPid{};
|
||||
int m_ret = 0;
|
||||
Config m_config{}; // m_ is prefix for member variable
|
||||
Control m_control{};
|
||||
Sensors m_sensors{};
|
||||
@@ -62,6 +64,8 @@ class Application {
|
||||
void hassThread(const std::stop_token& st);
|
||||
void sensorsThread(const std::stop_token& st);
|
||||
void displayThread(const std::stop_token& st);
|
||||
|
||||
void Crash(int ret);
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user