diff --git a/src/hasp/hasp.cpp b/src/hasp/hasp.cpp index 8c3b2f5d..59b1d366 100644 --- a/src/hasp/hasp.cpp +++ b/src/hasp/hasp.cpp @@ -11,14 +11,12 @@ #include #endif -#include "ArduinoJson.h" - #if HASP_USE_EEPROM > 0 #include "StreamUtils.h" // For EEPromStream #endif -#include "lvgl.h" -#include "lv_conf.h" +#include "hasplib.h" +#include "lv_theme_hasp.h" #if HASP_USE_DEBUG > 0 #include "../hasp_debug.h" @@ -31,10 +29,6 @@ //#include "hasp_filesystem.h" included in hasp_conf.h #endif -#include "hasplib.h" -#include "hasp.h" -#include "lv_theme_hasp.h" - #include "dev/device.h" #if HASP_USE_EEPROM > 0 diff --git a/src/hasp/hasp_attribute.cpp b/src/hasp/hasp_attribute.cpp index c0d5a41f..2ae49d51 100644 --- a/src/hasp/hasp_attribute.cpp +++ b/src/hasp/hasp_attribute.cpp @@ -5,11 +5,6 @@ #include "ArduinoLog.h" #endif -#include "lvgl.h" -#if LVGL_VERSION_MAJOR != 7 -#include "../lv_components.h" -#endif - #include "hasplib.h" LV_FONT_DECLARE(unscii_8_icon); diff --git a/src/hasp/hasp_attribute.h b/src/hasp/hasp_attribute.h index 1d0f5b0a..cfad4afe 100644 --- a/src/hasp/hasp_attribute.h +++ b/src/hasp/hasp_attribute.h @@ -4,14 +4,7 @@ #ifndef HASP_ATTR_SET_H #define HASP_ATTR_SET_H -#include "lvgl.h" -#if LVGL_VERSION_MAJOR != 7 -#include "../lv_components.h" -#endif - -#include "hasp_conf.h" -#include "hasp.h" -#include "hasp_object.h" +#include "hasplib.h" #ifdef __cplusplus extern "C" { diff --git a/src/hasp/hasp_dispatch.cpp b/src/hasp/hasp_dispatch.cpp index dbf02222..52fdec91 100644 --- a/src/hasp/hasp_dispatch.cpp +++ b/src/hasp/hasp_dispatch.cpp @@ -1,8 +1,6 @@ /* MIT License - Copyright (c) 2019-2021 Francis Van Roie For full license information read the LICENSE file in the project folder */ -#include - //#include "ArduinoLog.h" #include "hasplib.h" diff --git a/src/hasp/hasp_event.cpp b/src/hasp/hasp_event.cpp index 9aa2e9b9..e6fdd6c7 100644 --- a/src/hasp/hasp_event.cpp +++ b/src/hasp/hasp_event.cpp @@ -22,7 +22,6 @@ * ******************************************************************************************** */ -#include "hasp_conf.h" #include "hasplib.h" #include "lv_core/lv_obj.h" // for tabview ext diff --git a/src/hasp/hasp_object.cpp b/src/hasp/hasp_object.cpp index 52b7fee2..664dea4f 100644 --- a/src/hasp/hasp_object.cpp +++ b/src/hasp/hasp_object.cpp @@ -15,11 +15,6 @@ #include "ArduinoLog.h" #endif -#include "lvgl.h" -#if LVGL_VERSION_MAJOR != 7 -#include "../lv_components.h" -#endif - #include "hasplib.h" const char** btnmatrix_default_map; // memory pointer to lvgl default btnmatrix map diff --git a/src/hasp/hasp_page.cpp b/src/hasp/hasp_page.cpp index 93af782c..e1d57094 100644 --- a/src/hasp/hasp_page.cpp +++ b/src/hasp/hasp_page.cpp @@ -1,11 +1,8 @@ /* MIT License - Copyright (c) 2019-2021 Francis Van Roie For full license information read the LICENSE file in the project folder */ -#include "hasp_conf.h" #include "hasplib.h" -#include "hasp_page.h" - namespace hasp { bool Page::is_valid(uint8_t pageid) diff --git a/src/hasp/hasp_page.h b/src/hasp/hasp_page.h index 03b55e08..d649c8fb 100644 --- a/src/hasp/hasp_page.h +++ b/src/hasp/hasp_page.h @@ -4,7 +4,6 @@ #ifndef HASP_PAGES_H #define HASP_PAGES_H -#include "hasp_conf.h" #include "hasplib.h" /********************* diff --git a/src/hasp/hasp_parser.cpp b/src/hasp/hasp_parser.cpp index 3ac427c1..28d88b58 100644 --- a/src/hasp/hasp_parser.cpp +++ b/src/hasp/hasp_parser.cpp @@ -1,17 +1,11 @@ /* MIT License - Copyright (c) 2019-2021 Francis Van Roie For full license information read the LICENSE file in the project folder */ -#include -#include -#include - #ifdef ARDUINO #include "pgmspace.h" #include "Arduino.h" #endif -#include "lvgl.h" - #include "hasplib.h" bool Parser::haspPayloadToColor(const char* payload, lv_color32_t& color) diff --git a/src/hasp_gui.cpp b/src/hasp_gui.cpp index 77d795bc..d65e32bd 100644 --- a/src/hasp_gui.cpp +++ b/src/hasp_gui.cpp @@ -1,10 +1,8 @@ /* MIT License - Copyright (c) 2019-2021 Francis Van Roie For full license information read the LICENSE file in the project folder */ -#include "hasp_conf.h" +#include "hasplib.h" -#include "lv_conf.h" -#include "lvgl.h" #include "lv_drv_conf.h" // Filesystem Driver @@ -24,8 +22,6 @@ #include "hasp_gui.h" #include "hasp_oobe.h" -#include "hasplib.h" - //#include "tpcal.h" //#include "Ticker.h" diff --git a/src/hasp_oobe.cpp b/src/hasp_oobe.cpp index 306a0135..aa8165d2 100644 --- a/src/hasp_oobe.cpp +++ b/src/hasp_oobe.cpp @@ -3,12 +3,7 @@ #if HASP_USE_CONFIG > 0 -#include "hasp_conf.h" - -#include "lvgl.h" -#if LVGL_VERSION_MAJOR != 7 -#include "../lv_components.h" -#endif +#include "hasplib.h" #include "hasp_gui.h" #include "hasp_config.h" diff --git a/src/hasplib.h b/src/hasplib.h index 6a447243..60fdf8fb 100644 --- a/src/hasplib.h +++ b/src/hasplib.h @@ -1,5 +1,13 @@ +#include +#include +#include +#include + #include "hasp_conf.h" +#include "lv_conf.h" +#include "lvgl.h" + #include "hasp/hasp.h" #include "hasp/hasp_attribute.h" #include "hasp/hasp_dispatch.h" @@ -9,4 +17,6 @@ #include "hasp/hasp_parser.h" #include "hasp/hasp_lvfs.h" -#include "hasp/lv_theme_hasp.h" \ No newline at end of file +#include "hasp/lv_theme_hasp.h" + +#include "ArduinoJson.h" diff --git a/src/mqtt/hasp_mqtt_paho_single.cpp b/src/mqtt/hasp_mqtt_paho_single.cpp index 608855cb..7165e33f 100644 --- a/src/mqtt/hasp_mqtt_paho_single.cpp +++ b/src/mqtt/hasp_mqtt_paho_single.cpp @@ -3,9 +3,6 @@ /* Single threaded synchronous paho client */ -#include - -#include "hasp_conf.h" #include "hasplib.h" #if HASP_USE_MQTT > 0