From 9ccd3286085e363092a96641d130124c8421bfa0 Mon Sep 17 00:00:00 2001 From: fvanroie Date: Tue, 28 Apr 2020 16:15:50 +0200 Subject: [PATCH] Fix stm32 build issue --- include/hasp_conf.h | 2 +- src/hasp.cpp | 21 +++------------------ 2 files changed, 4 insertions(+), 19 deletions(-) diff --git a/include/hasp_conf.h b/include/hasp_conf.h index d3382322..a14b936f 100644 --- a/include/hasp_conf.h +++ b/include/hasp_conf.h @@ -49,7 +49,7 @@ #include "hasp_spiffs.h" #if defined(ARDUINO_ARCH_ESP32) || defined(ARDUINO_ARCH_ESP8266) -#include "lv_zifont.h" +//#include "lv_zifont.h" #endif #endif diff --git a/src/hasp.cpp b/src/hasp.cpp index 8f7b8da5..cab2eaeb 100644 --- a/src/hasp.cpp +++ b/src/hasp.cpp @@ -8,22 +8,10 @@ #include "lvgl.h" #include "lv_conf.h" +#include "hasp_conf.h" //#include "../lib/lvgl/src/lv_widgets/lv_roller.h" -#if HASP_USE_SPIFFS > 0 -#if defined(ARDUINO_ARCH_ESP32) -#include "SPIFFS.h" -#endif -#include // Include the SPIFFS library -#endif - -#if HASP_USE_SPIFFS > 0 -#if defined(ARDUINO_ARCH_ESP32) || defined(ARDUINO_ARCH_ESP8266) -#include "lv_zifont.h" -#endif -#endif - #include "lv_fs_if.h" #include "hasp_debug.h" #include "hasp_config.h" @@ -36,11 +24,6 @@ #include "hasp_attribute.h" #include "hasp.h" -#include "hasp_conf.h" -#if HASP_USE_MQTT -#include "hasp_mqtt.h" -#endif - //#if LV_USE_HASP /********************* @@ -377,6 +360,7 @@ void haspSetup() /* ********** Font Initializations ********** */ defaultFont = LV_FONT_DEFAULT; // Use default font #if HASP_USE_SPIFFS > 0 +#if defined(ARDUINO_ARCH_ESP32) || defined(ARDUINO_ARCH_ESP8266) lv_zifont_init(); if(lv_zifont_font_init(&haspFonts[0], haspZiFontPath, 24) != 0) { @@ -384,6 +368,7 @@ void haspSetup() } else { defaultFont = haspFonts[0]; } +#endif #endif /* ********** Font Initializations ********** */