refactor + todo
This commit is contained in:
@@ -21,7 +21,7 @@ struct sensors {
|
||||
std::mutex mtx; // making sure the struct isnt accessed by multiple threads at once
|
||||
};
|
||||
|
||||
void start();
|
||||
void run();
|
||||
|
||||
} // namespace app
|
||||
|
||||
|
||||
4
main.cpp
4
main.cpp
@@ -1,6 +1,6 @@
|
||||
#include <app.hpp>
|
||||
|
||||
// put app in a class w a constructor for all the basic params
|
||||
int main() {
|
||||
app::start();
|
||||
app::run();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -152,7 +152,7 @@ void displayThread(const std::stop_token& st, app::sensors& s) {
|
||||
lcd.flushBuf();
|
||||
}
|
||||
|
||||
void start() {
|
||||
void run() {
|
||||
applog(LOG::START, "Application started");
|
||||
std::signal(SIGINT, app::signalHandler);
|
||||
std::signal(SIGTERM, app::signalHandler);
|
||||
|
||||
Reference in New Issue
Block a user