diff --git a/LVGL Simulator/LVGL.Simulator/HardwareSimulator.hpp b/LVGL Simulator/LVGL.Simulator/HardwareSimulator.hpp index 7dd3218..65e254b 100644 --- a/LVGL Simulator/LVGL.Simulator/HardwareSimulator.hpp +++ b/LVGL Simulator/LVGL.Simulator/HardwareSimulator.hpp @@ -3,9 +3,6 @@ #include #include -#define screenWidth 240 -#define screenHeight 320 - class HardwareSimulator : public HardwareAbstractionInterface { @@ -25,14 +22,9 @@ class HardwareSimulator : }; - virtual void initLVGL( - display_flush_cb aDisplayFlushCb = nullptr, - touch_pad_read aTouchPadReadCb = nullptr) override { + virtual void init() override { lv_init(); - }; - - virtual lv_coord_t getScreenWidth() { return screenWidth; }; - virtual lv_coord_t getScreenHeight() { return screenHeight; }; + } }; diff --git a/LVGL Simulator/LVGL.Simulator/LVGL.Simulator.cpp b/LVGL Simulator/LVGL.Simulator/LVGL.Simulator.cpp index 7f5065e..0164be0 100644 --- a/LVGL Simulator/LVGL.Simulator/LVGL.Simulator.cpp +++ b/LVGL Simulator/LVGL.Simulator/LVGL.Simulator.cpp @@ -157,7 +157,7 @@ bool multiple_display_mode_initialization() int main() { auto hal = std::make_shared(); - hal->initLVGL(); + hal->init(); auto ui = OmoteUI::getInstance(hal); diff --git a/LVGL Simulator/LVGL.Simulator/omoteconfig.h b/LVGL Simulator/LVGL.Simulator/omoteconfig.h index 0838bbe..4f8b2f6 100644 --- a/LVGL Simulator/LVGL.Simulator/omoteconfig.h +++ b/LVGL Simulator/LVGL.Simulator/omoteconfig.h @@ -1,3 +1,6 @@ #pragma once #define IS_SIMULATOR true + +#define SCREEN_WIDTH 240 +#define SCREEN_HEIGHT 360 diff --git a/Platformio/include/OmoteUI/HardwareAbstractionInterface.h b/Platformio/include/OmoteUI/HardwareAbstractionInterface.h index 5b7f678..1b262c3 100644 --- a/Platformio/include/OmoteUI/HardwareAbstractionInterface.h +++ b/Platformio/include/OmoteUI/HardwareAbstractionInterface.h @@ -19,6 +19,4 @@ public: virtual void init() = 0; -protected: - virtual void initLVGL() = 0; };