All modules and core of the app was created
This commit is contained in:
23
App.hpp
Normal file
23
App.hpp
Normal file
@@ -0,0 +1,23 @@
|
||||
#include "Logic/FlightDispatcher.hpp"
|
||||
#include "esp_log.h"
|
||||
|
||||
class Application {
|
||||
public:
|
||||
Application(FlightDispatcher *dispatcher) {
|
||||
assert(dispatcher != nullptr);
|
||||
_dispatcher = dispatcher;
|
||||
ESP_LOGI(_tag, "Application startup complete");
|
||||
}
|
||||
|
||||
void tick() {
|
||||
_dispatcher->tick();
|
||||
}
|
||||
|
||||
~Application() {
|
||||
ESP_LOGI(_tag, "Application destroyed");
|
||||
delete _dispatcher;
|
||||
}
|
||||
private:
|
||||
FlightDispatcher *_dispatcher = nullptr;
|
||||
static constexpr const char *_tag = "Application";
|
||||
};
|
||||
Reference in New Issue
Block a user