mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-27 13:16:45 +00:00
Fix Linux compile error
This commit is contained in:
parent
39f8e17add
commit
c5fb8fffc6
@ -28,26 +28,23 @@ void font_setup()
|
|||||||
{
|
{
|
||||||
_lv_ll_init(&hasp_fonts_ll, sizeof(hasp_font_info_t));
|
_lv_ll_init(&hasp_fonts_ll, sizeof(hasp_font_info_t));
|
||||||
|
|
||||||
// initialize the FreeType renderer
|
#if(HASP_USE_FREETYPE > 0) // initialize the FreeType renderer
|
||||||
// #ifdef 1 || USE_LVGL_FREETYPE
|
|
||||||
#if defined(ARDUINO_ARCH_ESP32)
|
#if defined(ARDUINO_ARCH_ESP32)
|
||||||
|
if(lv_freetype_init(LVGL_FREETYPE_MAX_FACES, LVGL_FREETYPE_MAX_SIZES,
|
||||||
#if(HASP_USE_FREETYPE > 0)
|
hasp_use_psram() ? LVGL_FREETYPE_MAX_BYTES_PSRAM : LVGL_FREETYPE_MAX_BYTES)) {
|
||||||
|
|
||||||
if(lv_freetype_init(USE_LVGL_FREETYPE_MAX_FACES, USE_LVGL_FREETYPE_MAX_SIZES,
|
|
||||||
hasp_use_psram() ? USE_LVGL_FREETYPE_MAX_BYTES_PSRAM : USE_LVGL_FREETYPE_MAX_BYTES)) {
|
|
||||||
LOG_VERBOSE(TAG_FONT, F("FreeType v%d.%d.%d " D_SERVICE_STARTED), FREETYPE_MAJOR, FREETYPE_MINOR,
|
LOG_VERBOSE(TAG_FONT, F("FreeType v%d.%d.%d " D_SERVICE_STARTED), FREETYPE_MAJOR, FREETYPE_MINOR,
|
||||||
FREETYPE_PATCH);
|
FREETYPE_PATCH);
|
||||||
} else {
|
} else {
|
||||||
LOG_ERROR(TAG_FONT, F("FreeType " D_SERVICE_START_FAILED));
|
LOG_ERROR(TAG_FONT, F("FreeType " D_SERVICE_START_FAILED));
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
LOG_VERBOSE(TAG_FONT, F("FreeType " D_SERVICE_DISABLED));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#elif defined(WINDOWS) || defined(POSIX)
|
#elif defined(WINDOWS) || defined(POSIX)
|
||||||
#else
|
#else
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#else
|
||||||
|
LOG_VERBOSE(TAG_FONT, F("FreeType " D_SERVICE_DISABLED));
|
||||||
|
#endif // HASP_USE_FREETYPE
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t font_split_payload(const char* payload)
|
size_t font_split_payload(const char* payload)
|
||||||
@ -70,7 +67,9 @@ void font_clear_list()
|
|||||||
if(hasp_font_info_t* font_p = (hasp_font_info_t*)node) {
|
if(hasp_font_info_t* font_p = (hasp_font_info_t*)node) {
|
||||||
if(font_p->font) {
|
if(font_p->font) {
|
||||||
if(font_p->font->user_data) { // It's a FreeType font
|
if(font_p->font->user_data) { // It's a FreeType font
|
||||||
|
#if(HASP_USE_FREETYPE > 0)
|
||||||
lv_ft_font_destroy(font_p->font);
|
lv_ft_font_destroy(font_p->font);
|
||||||
|
#endif
|
||||||
} else { // It's a binary font
|
} else { // It's a binary font
|
||||||
hasp_font_free(font_p->font);
|
hasp_font_free(font_p->font);
|
||||||
}
|
}
|
||||||
|
@ -36,11 +36,11 @@ build_flags =
|
|||||||
; -- LittleFS build options ------------------------
|
; -- LittleFS build options ------------------------
|
||||||
;-D CONFIG_LITTLEFS_FOR_IDF_3_2 ; obsolete in IDF 3.3
|
;-D CONFIG_LITTLEFS_FOR_IDF_3_2 ; obsolete in IDF 3.3
|
||||||
; -- FreeType build options ------------------------
|
; -- FreeType build options ------------------------
|
||||||
-D LV_USE_FT_CACHE_MANAGER=1 ; crashes without cache
|
-D LV_USE_FT_CACHE_MANAGER=1 ; crashes without cache
|
||||||
-D USE_LVGL_FREETYPE_MAX_FACES=64 ; max number of FreeType faces in cache
|
-D LVGL_FREETYPE_MAX_FACES=64 ; max number of FreeType faces in cache
|
||||||
-D USE_LVGL_FREETYPE_MAX_SIZES=4 ; max number of sizes in cache
|
-D LVGL_FREETYPE_MAX_SIZES=4 ; max number of sizes in cache
|
||||||
-D USE_LVGL_FREETYPE_MAX_BYTES=16384 ; max bytes in cache
|
-D LVGL_FREETYPE_MAX_BYTES=16384 ; max bytes in cache
|
||||||
-D USE_LVGL_FREETYPE_MAX_BYTES_PSRAM=131072 ; max bytes in cache when using PSRAM
|
-D LVGL_FREETYPE_MAX_BYTES_PSRAM=131072 ; max bytes in cache when using PSRAM
|
||||||
; -- SimpleFTpServer build options -----------------
|
; -- SimpleFTpServer build options -----------------
|
||||||
-D HASP_USE_FTP=1
|
-D HASP_USE_FTP=1
|
||||||
-D FTP_SERVER_DEBUG
|
-D FTP_SERVER_DEBUG
|
||||||
|
@ -49,11 +49,11 @@ build_flags =
|
|||||||
; -- LittleFS build options ------------------------
|
; -- LittleFS build options ------------------------
|
||||||
;-D CONFIG_LITTLEFS_FOR_IDF_3_2 ; obsolete in IDF 3.3
|
;-D CONFIG_LITTLEFS_FOR_IDF_3_2 ; obsolete in IDF 3.3
|
||||||
; -- FreeType build options ------------------------
|
; -- FreeType build options ------------------------
|
||||||
-D LV_USE_FT_CACHE_MANAGER=1 ; crashes without cache
|
-D LV_USE_FT_CACHE_MANAGER=1 ; crashes without cache
|
||||||
-D USE_LVGL_FREETYPE_MAX_FACES=64 ; max number of FreeType faces in cache
|
-D LVGL_FREETYPE_MAX_FACES=64 ; max number of FreeType faces in cache
|
||||||
-D USE_LVGL_FREETYPE_MAX_SIZES=4 ; max number of sizes in cache
|
-D LVGL_FREETYPE_MAX_SIZES=4 ; max number of sizes in cache
|
||||||
-D USE_LVGL_FREETYPE_MAX_BYTES=16384 ; max bytes in cache
|
-D LVGL_FREETYPE_MAX_BYTES=16384 ; max bytes in cache
|
||||||
-D USE_LVGL_FREETYPE_MAX_BYTES_PSRAM=131072 ; max bytes in cache when using PSRAM
|
-D LVGL_FREETYPE_MAX_BYTES_PSRAM=131072 ; max bytes in cache when using PSRAM
|
||||||
|
|
||||||
lib_ignore =
|
lib_ignore =
|
||||||
GxTFT
|
GxTFT
|
||||||
|
@ -38,11 +38,11 @@ build_flags =
|
|||||||
-D PROGMEM= ; No PROGMEM available
|
-D PROGMEM= ; No PROGMEM available
|
||||||
|
|
||||||
; -- FreeType build options ------------------------
|
; -- FreeType build options ------------------------
|
||||||
-D LV_USE_FT_CACHE_MANAGER=1 ; crashes without cache
|
-D LV_USE_FT_CACHE_MANAGER=1 ; crashes without cache
|
||||||
-D USE_LVGL_FREETYPE_MAX_FACES=64 ; max number of FreeType faces in cache
|
-D LVGL_FREETYPE_MAX_FACES=64 ; max number of FreeType faces in cache
|
||||||
-D USE_LVGL_FREETYPE_MAX_SIZES=4 ; max number of sizes in cache
|
-D LVGL_FREETYPE_MAX_SIZES=4 ; max number of sizes in cache
|
||||||
-D USE_LVGL_FREETYPE_MAX_BYTES=16384 ; max bytes in cache
|
-D LVGL_FREETYPE_MAX_BYTES=16384 ; max bytes in cache
|
||||||
-D USE_LVGL_FREETYPE_MAX_BYTES_PSRAM=65536 ; max bytes in cache when using PSRAM
|
-D LVGL_FREETYPE_MAX_BYTES_PSRAM=65536 ; max bytes in cache when using PSRAM
|
||||||
|
|
||||||
;-D LV_LOG_LEVEL=LV_LOG_LEVEL_INFO
|
;-D LV_LOG_LEVEL=LV_LOG_LEVEL_INFO
|
||||||
;-D LV_LOG_PRINTF=1
|
;-D LV_LOG_PRINTF=1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user