mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-28 13:46:36 +00:00
Add logging
This commit is contained in:
parent
0523c37598
commit
496a4af2ec
@ -13,7 +13,6 @@
|
||||
#include "hasplib.h"
|
||||
|
||||
LV_FONT_DECLARE(unscii_8_icon);
|
||||
extern lv_font_t* haspFonts[8];
|
||||
extern const char** btnmatrix_default_map; // memory pointer to lvgl default btnmatrix map
|
||||
|
||||
#if 0
|
||||
@ -454,10 +453,8 @@ static lv_font_t* haspPayloadToFont(const char* payload)
|
||||
uint8_t var = atoi(payload);
|
||||
|
||||
switch(var) {
|
||||
case 0:
|
||||
case 1:
|
||||
case 2:
|
||||
case 3:
|
||||
case 0 ... 7:
|
||||
LOG_WARNING(TAG_ATTR, "%s %d %x", __FILE__, __LINE__, robotocondensed_regular_12_nokern);
|
||||
return hasp_get_font(var);
|
||||
|
||||
case 8:
|
||||
@ -467,22 +464,25 @@ static lv_font_t* haspPayloadToFont(const char* payload)
|
||||
|
||||
#ifdef LV_FONT_CUSTOM_12
|
||||
case 12:
|
||||
return LV_THEME_DEFAULT_FONT_SMALL;
|
||||
return &robotocondensed_regular_12_nokern;
|
||||
#endif
|
||||
|
||||
#ifdef LV_FONT_CUSTOM_16
|
||||
case 16:
|
||||
return LV_THEME_DEFAULT_FONT_NORMAL;
|
||||
LOG_WARNING(TAG_ATTR, "%s %d %x", __FILE__, __LINE__, robotocondensed_regular_16_nokern);
|
||||
return &robotocondensed_regular_16_nokern;
|
||||
#endif
|
||||
|
||||
#ifdef LV_FONT_CUSTOM_22
|
||||
case 22:
|
||||
return LV_THEME_DEFAULT_FONT_SUBTITLE;
|
||||
LOG_WARNING(TAG_ATTR, "%s %d %x", __FILE__, __LINE__, robotocondensed_regular_22_nokern);
|
||||
return &robotocondensed_regular_22_nokern;
|
||||
#endif
|
||||
|
||||
#ifdef LV_FONT_CUSTOM_28
|
||||
case 28:
|
||||
return LV_THEME_DEFAULT_FONT_TITLE;
|
||||
LOG_WARNING(TAG_ATTR, "%s %d %x", __FILE__, __LINE__, robotocondensed_regular_28_nokern);
|
||||
return &robotocondensed_regular_28_nokern;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@ -885,6 +885,7 @@ static void hasp_local_style_attr(lv_obj_t* obj, const char* attr_p, uint16_t at
|
||||
case ATTR_TEXT_FONT: {
|
||||
lv_font_t* font = haspPayloadToFont(payload);
|
||||
if(font) {
|
||||
LOG_WARNING(TAG_ATTR, "%s %d %x", __FILE__, __LINE__, *font);
|
||||
uint8_t count = 3;
|
||||
if(check_obj_type(obj, LV_HASP_ROLLER)) count = my_roller_get_visible_row_count(obj);
|
||||
lv_obj_set_style_local_text_font(obj, part, state, font);
|
||||
|
@ -28,8 +28,6 @@ static bool oobeAutoCalibrate = true;
|
||||
|
||||
static lv_obj_t* oobepage[2];
|
||||
static lv_obj_t* oobekb;
|
||||
extern lv_font_t * defaultFont;
|
||||
|
||||
lv_obj_t* pwd_ta;
|
||||
|
||||
static inline void oobeSetPage(uint8_t pageid)
|
||||
|
@ -56,6 +56,7 @@ 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
|
||||
|
Loading…
x
Reference in New Issue
Block a user