diff --git a/Platformio/OmoteUI/UIs/Basic/OmoteUI.cpp b/Platformio/OmoteUI/UIs/Basic/OmoteUI.cpp index 936807f..8b862a0 100644 --- a/Platformio/OmoteUI/UIs/Basic/OmoteUI.cpp +++ b/Platformio/OmoteUI/UIs/Basic/OmoteUI.cpp @@ -3,6 +3,8 @@ #include "omoteconfig.h" #include +using namespace UI::Basic; + std::shared_ptr OmoteUI::mInstance = nullptr; // This can be used to flag out specific code for SIM only diff --git a/Platformio/OmoteUI/UIs/Basic/OmoteUI.hpp b/Platformio/OmoteUI/UIs/Basic/OmoteUI.hpp index 9d314a8..d415b94 100644 --- a/Platformio/OmoteUI/UIs/Basic/OmoteUI.hpp +++ b/Platformio/OmoteUI/UIs/Basic/OmoteUI.hpp @@ -11,6 +11,7 @@ #include #include "poller.hpp" +namespace UI::Basic{ /// @brief Singleton to allow UI code to live separately from the Initialization /// of resources. class OmoteUI : public UIBase { @@ -235,3 +236,5 @@ void create_keyboard(); */ void display_settings(lv_obj_t* parent); }; + +} \ No newline at end of file diff --git a/Platformio/OmoteUI/UIs/Basic/displaySettings.cpp b/Platformio/OmoteUI/UIs/Basic/displaySettings.cpp index 2f9dd39..90d240e 100644 --- a/Platformio/OmoteUI/UIs/Basic/displaySettings.cpp +++ b/Platformio/OmoteUI/UIs/Basic/displaySettings.cpp @@ -1,5 +1,8 @@ #include "OmoteUI.hpp" +using namespace UI::Basic; + + void OmoteUI::display_settings(lv_obj_t* parent) { diff --git a/Platformio/OmoteUI/UIs/Basic/wifiSettings.cpp b/Platformio/OmoteUI/UIs/Basic/wifiSettings.cpp index d5f67eb..a7c76ca 100644 --- a/Platformio/OmoteUI/UIs/Basic/wifiSettings.cpp +++ b/Platformio/OmoteUI/UIs/Basic/wifiSettings.cpp @@ -3,6 +3,8 @@ #define WIFI_SUBPAGE_SIZE 3 static char* ssid; +using namespace UI::Basic; + lv_obj_t* OmoteUI::create_wifi_selection_page(lv_obj_t* menu) { /* Create sub page for wifi*/ diff --git a/Platformio/OmoteUI/UIs/UIBase.cpp b/Platformio/OmoteUI/UIs/UIBase.cpp index e69de29..4ae9168 100644 --- a/Platformio/OmoteUI/UIs/UIBase.cpp +++ b/Platformio/OmoteUI/UIs/UIBase.cpp @@ -0,0 +1,7 @@ +#include "UIBase.hpp" + +using namespace UI; + +UIBase::UIBase(std::shared_ptr aHardware):mHardware(aHardware){ + +} \ No newline at end of file diff --git a/Platformio/OmoteUI/UIs/UIBase.hpp b/Platformio/OmoteUI/UIs/UIBase.hpp index 35295d6..9422f10 100644 --- a/Platformio/OmoteUI/UIs/UIBase.hpp +++ b/Platformio/OmoteUI/UIs/UIBase.hpp @@ -5,12 +5,15 @@ #include "HardwareAbstract.hpp" #include +namespace UI{ + class UIBase{ public: - UIBase(std::shared_ptr aHardware): - mHardware(aHardware){} + UIBase(std::shared_ptr aHardware); protected: std::shared_ptr mHardware; -}; \ No newline at end of file +}; + +} \ No newline at end of file diff --git a/Platformio/src/simMain.cpp b/Platformio/src/simMain.cpp index 3fa4c78..480bc7a 100644 --- a/Platformio/src/simMain.cpp +++ b/Platformio/src/simMain.cpp @@ -7,7 +7,7 @@ int main(){ auto hwSim = std::make_shared(); hwSim->init(); - auto ui = OmoteUI::getInstance(hwSim); + auto ui = UI::Basic::OmoteUI::getInstance(hwSim); ui->layout_UI(); while (true){