From 0f52d808ea8aadf1a8c80820016dccb68dd4ed07 Mon Sep 17 00:00:00 2001 From: fvanroie <15969459+fvanroie@users.noreply.github.com> Date: Thu, 18 Mar 2021 01:53:48 +0100 Subject: [PATCH] Remove some font logging for esp8266 --- src/hasp/hasp.cpp | 8 ++++---- src/hasp/hasp_attribute.cpp | 2 +- src/main_arduino.cpp | 1 - 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/hasp/hasp.cpp b/src/hasp/hasp.cpp index 3e8ed004..1ede4354 100644 --- a/src/hasp/hasp.cpp +++ b/src/hasp/hasp.cpp @@ -93,8 +93,7 @@ lv_obj_t* kb; // lv_font_t * defaultFont; lv_obj_t* pages[HASP_NUM_PAGES]; -static lv_font_t* haspFonts[4] = {LV_THEME_DEFAULT_FONT_SMALL, LV_THEME_DEFAULT_FONT_NORMAL, - LV_THEME_DEFAULT_FONT_SUBTITLE, LV_THEME_DEFAULT_FONT_TITLE}; +static lv_font_t* haspFonts[4] = {nullptr, nullptr, nullptr, nullptr}; uint8_t current_page = 1; /** @@ -363,12 +362,13 @@ void haspSetup(void) /* ********** Font Initializations ********** */ - LOG_WARNING(TAG_ATTR, "%s %d %x", __FILE__, __LINE__, &robotocondensed_regular_16_nokern); LOG_WARNING(TAG_ATTR, "%s %d %x", __FILE__, __LINE__, nullptr); LOG_WARNING(TAG_ATTR, "%s %d %x", __FILE__, __LINE__, haspFonts[1]); + // LOG_WARNING(TAG_ATTR, "%s %d %x", __FILE__, __LINE__, &robotocondensed_regular_16_nokern); #if HASP_USE_SPIFFS > 0 || HASP_USE_LITTLEFS > 0 #if defined(ARDUINO_ARCH_ESP32) || defined(ARDUINO_ARCH_ESP8266) + lv_font_t* hasp_font = nullptr; // required or font init will crash lv_zifont_init(); @@ -381,7 +381,7 @@ void haspSetup(void) haspFonts[0] = hasp_font; // save it } - LOG_WARNING(TAG_ATTR, "%s %d %x", __FILE__, __LINE__, robotocondensed_regular_16_nokern); + // LOG_WARNING(TAG_ATTR, "%s %d %x", __FILE__, __LINE__, robotocondensed_regular_16_nokern); LOG_WARNING(TAG_ATTR, "%s %d %x", __FILE__, __LINE__, *hasp_font); #endif diff --git a/src/hasp/hasp_attribute.cpp b/src/hasp/hasp_attribute.cpp index 22330ed0..37482e5a 100644 --- a/src/hasp/hasp_attribute.cpp +++ b/src/hasp/hasp_attribute.cpp @@ -454,7 +454,7 @@ static lv_font_t* haspPayloadToFont(const char* payload) switch(var) { case 0 ... 7: - LOG_WARNING(TAG_ATTR, "%s %d %x", __FILE__, __LINE__, robotocondensed_regular_12_nokern); + // LOG_WARNING(TAG_ATTR, "%s %d %x", __FILE__, __LINE__, robotocondensed_regular_12_nokern); return hasp_get_font(var); case 8: diff --git a/src/main_arduino.cpp b/src/main_arduino.cpp index db06a6a1..c863a28a 100644 --- a/src/main_arduino.cpp +++ b/src/main_arduino.cpp @@ -56,7 +56,6 @@ void setup() #if HASP_USE_CONFIG > 0 configSetup(); // also runs debugPreSetup(), debugSetup() and debugStart() #endif - LOG_WARNING(TAG_ATTR, "%s %d %x", __FILE__, __LINE__, &robotocondensed_regular_16_nokern); guiSetup(); debugSetup(); // Init the console