diff --git a/.gitignore b/.gitignore index a3f6de1..96b85f7 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ build/ sdkconfig sdkconfig.old .vscode/ -managed_components/ \ No newline at end of file +managed_components/ +.DS_Store \ No newline at end of file diff --git a/assets/fonts/Roboto-Light.ttf b/assets/fonts/Roboto-Light.ttf new file mode 100644 index 0000000..46deecf Binary files /dev/null and b/assets/fonts/Roboto-Light.ttf differ diff --git a/assets/fonts/fa-regular-400.ttf b/assets/fonts/fa-regular-400.ttf new file mode 100644 index 0000000..b057e77 Binary files /dev/null and b/assets/fonts/fa-regular-400.ttf differ diff --git a/main/CMakeLists.txt b/main/CMakeLists.txt index c34a50d..a94ea35 100644 --- a/main/CMakeLists.txt +++ b/main/CMakeLists.txt @@ -18,7 +18,7 @@ idf_component_register( "light.c" "led_strip_encoder/led_strip_encoder.c" "gui.c" - + "net_gateway_monitor.c" "app_icon_8.c" INCLUDE_DIRS "." ) \ No newline at end of file diff --git a/main/app_icon_8.c b/main/app_icon_8.c index b9efeb2..c9b74d7 100644 --- a/main/app_icon_8.c +++ b/main/app_icon_8.c @@ -35,7 +35,19 @@ static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = { 0xc0, /* U+F6AB "" */ - 0x79, 0x8, 0x1, 0x80}; + 0x79, 0x8, 0x1, 0x80, + + /* U+F354 "" */ + 0x38, 0x28, 0x28, 0x28, 0xee, 0x82, 0x44, 0x28, 0x10, + + /* U+F357 "" */ + 0x8, 0x14, 0x22, 0x41, 0x77, 0x14, 0x14, 0x14, 0x1c, + + /* U+F354 "" */ + 0x31, 0x45, 0x37, 0x85, 0x23, 0x0, + + /* U+F357 "" */ + 0x31, 0x28, 0x7b, 0x30, 0xc3, 0x0}; /*--------------------- * GLYPH DESCRIPTION @@ -83,7 +95,21 @@ static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = { .box_w = 7, .box_h = 4, .ofs_x = 2, - .ofs_y = 0}}; + .ofs_y = 0}, + {.bitmap_index = 48, + .adv_w = 96, + .box_w = 6, + .box_h = 7, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 54, + .adv_w = 96, + .box_w = 6, + .box_h = 7, + .ofs_x = 0, + .ofs_y = -1} + +}; /*--------------------- * CHARACTER MAPPING diff --git a/main/fonts/app_10.c b/main/fonts/app_10.c new file mode 100644 index 0000000..1579230 --- /dev/null +++ b/main/fonts/app_10.c @@ -0,0 +1,2461 @@ +/******************************************************************************* + * Size: 10 px + * Bpp: 1 + * Opts: --size 10 --bpp 1 --format lvgl --lv-include lvgl.h --output + *../main/fonts/app_10.c --font fonts/Roboto-Light.ttf -r 0x0-0x127 --font + *fonts/fa-regular-400.ttf -r + *0xe1cb,0xe1cc,0xe29e,0xf1eb,0xf6aa,0xf6ab,0xf354,0xf357 + ******************************************************************************/ + +#ifdef LV_LVGL_H_INCLUDE_SIMPLE +#include "lvgl.h" +#else +#include "lvgl.h" +#endif + +#ifndef APP_10 +#define APP_10 1 +#endif + +#if APP_10 + +/*----------------- + * BITMAPS + *----------------*/ + +/*Store the image of the glyphs*/ +static LV_ATTRIBUTE_LARGE_CONST const uint8_t app_10_glyph_bitmap[] = { + /* U+0000 "\u0000" */ + 0x0, + + /* U+0002 "\u0002" */ + 0x0, + + /* U+000D "\r" */ + 0x0, + + /* U+0020 " " */ + 0x0, + + /* U+0021 "!" */ + 0xfd, + + /* U+0022 "\"" */ + 0xf0, + + /* U+0023 "#" */ + 0x20, 0xa7, 0xd2, 0x53, 0xf5, 0x14, + + /* U+0024 "$" */ + 0x23, 0xa3, 0x4, 0x18, 0x31, 0x71, 0x0, + + /* U+0025 "%" */ + 0xc1, 0x52, 0xa2, 0x81, 0x45, 0x4a, 0x86, + + /* U+0026 "&" */ + 0x21, 0x46, 0x8, 0x66, 0x58, 0x9d, + + /* U+0027 "'" */ + 0xc0, + + /* U+0028 "(" */ + 0x2a, 0x49, 0x24, 0x91, 0x0, + + /* U+0029 ")" */ + 0x89, 0x12, 0x49, 0x49, 0x0, + + /* U+002A "*" */ + 0x22, 0x75, + + /* U+002B "+" */ + 0x21, 0x9, 0xf2, 0x10, + + /* U+002C "," */ + 0xc0, + + /* U+002D "-" */ + 0xe0, + + /* U+002E "." */ + 0x80, + + /* U+002F "/" */ + 0x22, 0x24, 0x44, 0x88, 0x80, + + /* U+0030 "0" */ + 0x74, 0x63, 0x18, 0xc6, 0x2e, + + /* U+0031 "1" */ + 0x74, 0x92, 0x49, + + /* U+0032 "2" */ + 0x74, 0x42, 0x21, 0x11, 0x1f, + + /* U+0033 "3" */ + 0x74, 0x42, 0x60, 0x86, 0x2e, + + /* U+0034 "4" */ + 0x11, 0x94, 0xa9, 0x7c, 0x42, + + /* U+0035 "5" */ + 0xf8, 0x8e, 0x11, 0x9e, + + /* U+0036 "6" */ + 0x36, 0x2d, 0xa8, 0xc6, 0x2e, + + /* U+0037 "7" */ + 0xf8, 0x44, 0x22, 0x10, 0x88, + + /* U+0038 "8" */ + 0x74, 0x62, 0xe8, 0xc6, 0x2e, + + /* U+0039 "9" */ + 0x74, 0x63, 0x18, 0xbc, 0x4c, + + /* U+003A ":" */ + 0x0, + + /* U+003B ";" */ + 0x6, + + /* U+003C "<" */ + 0x16, 0x86, 0x10, + + /* U+003D "=" */ + 0xf0, 0xf0, + + /* U+003E ">" */ + 0x86, 0x16, 0x80, + + /* U+003F "?" */ + 0x69, 0x12, 0x44, 0x2, + + /* U+0040 "@" */ + 0x1e, 0x30, 0xa3, 0x52, 0x9a, 0x4d, 0x26, 0x95, 0x36, 0x40, 0x1e, 0x0, + + /* U+0041 "A" */ + 0x10, 0xc3, 0x12, 0x49, 0xe8, 0x61, + + /* U+0042 "B" */ + 0xf4, 0x63, 0xe8, 0xc6, 0x3e, + + /* U+0043 "C" */ + 0x7a, 0x28, 0x20, 0x82, 0x18, 0x9e, + + /* U+0044 "D" */ + 0xf4, 0xa3, 0x18, 0xc6, 0x5e, + + /* U+0045 "E" */ + 0xfc, 0x21, 0xe8, 0x42, 0x1f, + + /* U+0046 "F" */ + 0xfc, 0x21, 0xf, 0x42, 0x10, + + /* U+0047 "G" */ + 0x7a, 0x18, 0x20, 0x9e, 0x18, 0x5e, + + /* U+0048 "H" */ + 0x86, 0x18, 0x7f, 0x86, 0x18, 0x61, + + /* U+0049 "I" */ + 0xff, + + /* U+004A "J" */ + 0x8, 0x42, 0x10, 0x86, 0x2e, + + /* U+004B "K" */ + 0x8c, 0xa9, 0x8a, 0x4a, 0x51, + + /* U+004C "L" */ + 0x88, 0x88, 0x88, 0x8f, + + /* U+004D "M" */ + 0x83, 0x8f, 0x1e, 0x5a, 0xb5, 0x6c, 0xc9, + + /* U+004E "N" */ + 0x87, 0x1c, 0x69, 0x96, 0x58, 0xe1, + + /* U+004F "O" */ + 0x7a, 0x28, 0x61, 0x86, 0x18, 0x9e, + + /* U+0050 "P" */ + 0xf4, 0x63, 0x1f, 0x42, 0x10, + + /* U+0051 "Q" */ + 0x7a, 0x28, 0x61, 0x86, 0x18, 0x9e, 0x8, + + /* U+0052 "R" */ + 0xf4, 0x63, 0x1f, 0x4a, 0x51, + + /* U+0053 "S" */ + 0x74, 0x60, 0x83, 0x6, 0x2e, + + /* U+0054 "T" */ + 0xf9, 0x8, 0x42, 0x10, 0x84, + + /* U+0055 "U" */ + 0x8c, 0x63, 0x18, 0xc6, 0x2e, + + /* U+0056 "V" */ + 0x86, 0x14, 0x92, 0x48, 0xc3, 0x4, + + /* U+0057 "W" */ + 0x88, 0xcc, 0xa6, 0x4a, 0xa5, 0x53, 0x31, 0x98, 0x44, + + /* U+0058 "X" */ + 0x89, 0x23, 0xc, 0x31, 0x44, 0xa1, + + /* U+0059 "Y" */ + 0x8c, 0x54, 0xa2, 0x10, 0x84, + + /* U+005A "Z" */ + 0xf8, 0x84, 0x42, 0x22, 0x1f, + + /* U+005B "[" */ + 0xea, 0xaa, 0xac, + + /* U+005C "\\" */ + 0x88, 0x44, 0x42, 0x22, 0x10, + + /* U+005D "]" */ + 0xd5, 0x55, 0x5c, + + /* U+005E "^" */ + 0x46, 0xa9, + + /* U+005F "_" */ + 0xf0, + + /* U+0060 "`" */ + 0x90, + + /* U+0061 "a" */ + 0x69, 0x79, 0x97, + + /* U+0062 "b" */ + 0x84, 0x3d, 0x18, 0xc6, 0x3e, + + /* U+0063 "c" */ + 0x74, 0x61, 0x8, 0xb8, + + /* U+0064 "d" */ + 0x8, 0x5f, 0x18, 0xc6, 0x2f, + + /* U+0065 "e" */ + 0x74, 0x7f, 0x8, 0x38, + + /* U+0066 "f" */ + 0x29, 0x74, 0x92, 0x40, + + /* U+0067 "g" */ + 0x7c, 0x63, 0x18, 0xbc, 0x2e, + + /* U+0068 "h" */ + 0x88, 0xe9, 0x99, 0x99, + + /* U+0069 "i" */ + 0xbf, + + /* U+006A "j" */ + 0x45, 0x55, 0x60, + + /* U+006B "k" */ + 0x88, 0x9a, 0xca, 0xa9, + + /* U+006C "l" */ + 0xff, + + /* U+006D "m" */ + 0xed, 0x26, 0x4c, 0x99, 0x32, 0x40, + + /* U+006E "n" */ + 0xe9, 0x99, 0x99, + + /* U+006F "o" */ + 0x74, 0x63, 0x18, 0xb8, + + /* U+0070 "p" */ + 0xf4, 0x63, 0x18, 0xfa, 0x10, + + /* U+0071 "q" */ + 0x7c, 0x63, 0x18, 0xbc, 0x21, + + /* U+0072 "r" */ + 0xf2, 0x49, 0x0, + + /* U+0073 "s" */ + 0x69, 0x43, 0x96, + + /* U+0074 "t" */ + 0x4b, 0xa4, 0x93, + + /* U+0075 "u" */ + 0x99, 0x99, 0x97, + + /* U+0076 "v" */ + 0x94, 0x94, 0xc6, 0x10, + + /* U+0077 "w" */ + 0x93, 0x25, 0xab, 0x66, 0xc4, 0x80, + + /* U+0078 "x" */ + 0x92, 0x88, 0x45, 0x48, + + /* U+0079 "y" */ + 0x94, 0x94, 0xc6, 0x11, 0x18, + + /* U+007A "z" */ + 0xf2, 0x24, 0x8f, + + /* U+007B "{" */ + 0x29, 0x25, 0x12, 0x48, 0x80, + + /* U+007C "|" */ + 0xff, 0xc0, + + /* U+007D "}" */ + 0x89, 0x24, 0x52, 0x4a, 0x0, + + /* U+007E "~" */ + 0x42, 0x60, + + /* U+00A0 " " */ + 0x0, + + /* U+00A1 "¡" */ + 0x3f, + + /* U+00A2 "¢" */ + 0x21, 0x35, 0x18, 0x42, 0x2e, 0x20, + + /* U+00A3 "£" */ + 0x32, 0x50, 0x8e, 0x21, 0x1f, + + /* U+00A4 "¤" */ + 0xb5, 0x28, 0x61, 0x86, 0x2f, 0x40, + + /* U+00A5 "¥" */ + 0x8c, 0x94, 0xcf, 0xfc, 0x84, + + /* U+00A6 "¦" */ + 0xf7, 0x80, + + /* U+00A7 "§" */ + 0x74, 0x60, 0x8b, 0x45, 0x26, 0x8c, 0x5c, + + /* U+00A8 "¨" */ + 0x20, + + /* U+00A9 "©" */ + 0x18, 0x66, 0x9a, 0xa5, 0xa1, 0xa5, 0x9a, 0x42, 0x3c, + + /* U+00AA "ª" */ + 0x75, 0xf0, + + /* U+00AB "«" */ + 0xbb, 0x50, + + /* U+00AC "¬" */ + 0xf1, + + /* U+00AD "­" */ + 0xe0, + + /* U+00AE "®" */ + 0x18, 0x66, 0xb2, 0xa9, 0xb1, 0xa9, 0xaa, 0x42, 0x3c, + + /* U+00AF "¯" */ + 0xe0, + + /* U+00B0 "°" */ + 0x55, 0x0, + + /* U+00B1 "±" */ + 0x21, 0x3e, 0x42, 0x3, 0xe0, + + /* U+00B2 "²" */ + 0xe5, 0x60, + + /* U+00B3 "³" */ + 0xe8, 0xf0, + + /* U+00B4 "´" */ + 0x40, + + /* U+00B5 "µ" */ + 0x99, 0x99, 0x9f, 0x88, + + /* U+00B6 "¶" */ + 0x7f, 0xff, 0x71, 0x11, + + /* U+00B7 "·" */ + 0x80, + + /* U+00B8 "¸" */ + 0x40, + + /* U+00B9 "¹" */ + 0x55, + + /* U+00BA "º" */ + 0x69, 0x96, + + /* U+00BB "»" */ + 0xd6, 0xe0, + + /* U+00BC "¼" */ + 0x41, 0x25, 0x14, 0x24, 0xf5, 0xc1, + + /* U+00BD "½" */ + 0xc0, 0x91, 0x42, 0xa2, 0xa8, 0x92, 0x7, + + /* U+00BE "¾" */ + 0x42, 0x84, 0xac, 0x54, 0xb4, 0xc1, + + /* U+00BF "¿" */ + 0x20, 0x4, 0x88, 0x96, + + /* U+00C0 "À" */ + 0x20, 0x41, 0xc, 0x31, 0x24, 0x9e, 0x86, 0x10, + + /* U+00C1 "Á" */ + 0x10, 0x1, 0xc, 0x31, 0x24, 0x9e, 0x86, 0x10, + + /* U+00C2 "Â" */ + 0x10, 0x81, 0xc, 0x31, 0x24, 0x9e, 0x86, 0x10, + + /* U+00C3 "Ã" */ + 0x28, 0x41, 0xc, 0x31, 0x24, 0x9e, 0x86, 0x10, + + /* U+00C4 "Ä" */ + 0x8, 0x1, 0xc, 0x31, 0x24, 0x9e, 0x86, 0x10, + + /* U+00C5 "Å" */ + 0x30, 0xc0, 0x8, 0x31, 0x45, 0x12, 0x7a, 0x18, 0x40, + + /* U+00C6 "Æ" */ + 0xf, 0x18, 0x28, 0x2f, 0x48, 0x78, 0x88, 0x8f, + + /* U+00C7 "Ç" */ + 0x74, 0x61, 0x8, 0x42, 0x2e, 0x30, 0x80, + + /* U+00C8 "È" */ + 0x41, 0x3f, 0x8, 0x7a, 0x10, 0x87, 0xc0, + + /* U+00C9 "É" */ + 0x20, 0x3f, 0x8, 0x7a, 0x10, 0x87, 0xc0, + + /* U+00CA "Ê" */ + 0x22, 0x3f, 0x8, 0x7a, 0x10, 0x87, 0xc0, + + /* U+00CB "Ë" */ + 0x10, 0x3f, 0x8, 0x7a, 0x10, 0x87, 0xc0, + + /* U+00CC "Ì" */ + 0x95, 0x55, 0x50, + + /* U+00CD "Í" */ + 0xaa, 0xaa, 0xa0, + + /* U+00CE "Î" */ + 0xd1, 0x24, 0x92, 0x48, + + /* U+00CF "Ï" */ + 0xa1, 0x24, 0x92, 0x48, + + /* U+00D0 "Ð" */ + 0x79, 0x24, 0x79, 0x45, 0x14, 0x9e, + + /* U+00D1 "Ñ" */ + 0x29, 0x48, 0x71, 0xc6, 0x99, 0x65, 0x8e, 0x10, + + /* U+00D2 "Ò" */ + 0x0, 0x80, 0x1e, 0x8a, 0x18, 0x61, 0x86, 0x27, 0x80, + + /* U+00D3 "Ó" */ + 0x0, 0x40, 0x1e, 0x8a, 0x18, 0x61, 0x86, 0x27, 0x80, + + /* U+00D4 "Ô" */ + 0x30, 0x7, 0xa2, 0x86, 0x18, 0x61, 0x89, 0xe0, + + /* U+00D5 "Õ" */ + 0x38, 0x7, 0xa2, 0x86, 0x18, 0x61, 0x89, 0xe0, + + /* U+00D6 "Ö" */ + 0x28, 0x7, 0xa2, 0x86, 0x18, 0x61, 0x89, 0xe0, + + /* U+00D7 "×" */ + 0x51, 0x8, 0xa0, + + /* U+00D8 "Ø" */ + 0x7e, 0x29, 0x65, 0xa6, 0x94, 0x9e, 0x80, + + /* U+00D9 "Ù" */ + 0x41, 0x23, 0x18, 0xc6, 0x31, 0x8b, 0x80, + + /* U+00DA "Ú" */ + 0x21, 0x23, 0x18, 0xc6, 0x31, 0x8b, 0x80, + + /* U+00DB "Û" */ + 0x22, 0x23, 0x18, 0xc6, 0x31, 0x8b, 0x80, + + /* U+00DC "Ü" */ + 0x50, 0x23, 0x18, 0xc6, 0x31, 0x8b, 0x80, + + /* U+00DD "Ý" */ + 0x21, 0x23, 0x15, 0x28, 0x84, 0x21, 0x0, + + /* U+00DE "Þ" */ + 0x87, 0xa3, 0x18, 0xfa, 0x10, + + /* U+00DF "ß" */ + 0x64, 0xa9, 0x4a, 0x4a, 0x3e, + + /* U+00E0 "à" */ + 0x40, 0x69, 0x79, 0x97, + + /* U+00E1 "á" */ + 0x20, 0x69, 0x79, 0x97, + + /* U+00E2 "â" */ + 0x20, 0x69, 0x79, 0x97, + + /* U+00E3 "ã" */ + 0x70, 0x69, 0x79, 0x97, + + /* U+00E4 "ä" */ + 0x40, 0x69, 0x79, 0x97, + + /* U+00E5 "å" */ + 0x26, 0x26, 0x97, 0x99, 0x70, + + /* U+00E6 "æ" */ + 0x6e, 0x91, 0x7f, 0x90, 0x90, 0x6e, + + /* U+00E7 "ç" */ + 0x74, 0x61, 0x8, 0xb8, 0x84, + + /* U+00E8 "è" */ + 0x41, 0x1d, 0x1f, 0xc2, 0xe, + + /* U+00E9 "é" */ + 0x10, 0x1d, 0x1f, 0xc2, 0xe, + + /* U+00EA "ê" */ + 0x20, 0x9d, 0x1f, 0xc2, 0xe, + + /* U+00EB "ë" */ + 0x50, 0x1d, 0x1f, 0xc2, 0xe, + + /* U+00EC "ì" */ + 0x85, 0x55, + + /* U+00ED "í" */ + 0x8a, 0xaa, + + /* U+00EE "î" */ + 0xc1, 0x24, 0x92, + + /* U+00EF "ï" */ + 0x21, 0x24, 0x92, + + /* U+00F0 "ð" */ + 0x41, 0x8c, 0xf8, 0xc6, 0x31, 0x70, + + /* U+00F1 "ñ" */ + 0x60, 0xe9, 0x99, 0x99, + + /* U+00F2 "ò" */ + 0x40, 0x1d, 0x18, 0xc6, 0x2e, + + /* U+00F3 "ó" */ + 0x20, 0x1d, 0x18, 0xc6, 0x2e, + + /* U+00F4 "ô" */ + 0x60, 0x1d, 0x18, 0xc6, 0x2e, + + /* U+00F5 "õ" */ + 0x70, 0x1d, 0x18, 0xc6, 0x2e, + + /* U+00F6 "ö" */ + 0x50, 0x1d, 0x18, 0xc6, 0x2e, + + /* U+00F7 "÷" */ + 0x20, 0x3e, 0x2, 0x0, + + /* U+00F8 "ø" */ + 0x3, 0xab, 0x5a, 0xe5, 0xc0, + + /* U+00F9 "ù" */ + 0x40, 0x99, 0x99, 0x97, + + /* U+00FA "ú" */ + 0x20, 0x99, 0x99, 0x97, + + /* U+00FB "û" */ + 0x60, 0x99, 0x99, 0x97, + + /* U+00FC "ü" */ + 0xa0, 0x99, 0x99, 0x97, + + /* U+00FD "ý" */ + 0x20, 0x25, 0x25, 0x31, 0x84, 0x46, 0x0, + + /* U+00FE "þ" */ + 0x84, 0x3d, 0x18, 0xc6, 0x3e, 0x84, 0x0, + + /* U+00FF "ÿ" */ + 0x50, 0x25, 0x25, 0x31, 0x84, 0x46, 0x0, + + /* U+0100 "Ā" */ + 0x38, 0x1, 0xc, 0x31, 0x24, 0x9e, 0x86, 0x10, + + /* U+0101 "ā" */ + 0x70, 0x69, 0x79, 0x97, + + /* U+0102 "Ă" */ + 0x28, 0x20, 0x41, 0x82, 0x85, 0x12, 0x3e, 0x45, 0x8, + + /* U+0103 "ă" */ + 0x60, 0x69, 0x79, 0x97, + + /* U+0104 "Ą" */ + 0x20, 0xc5, 0x14, 0x49, 0xe8, 0xa1, 0x8, 0x30, + + /* U+0105 "ą" */ + 0x69, 0x79, 0x97, 0x11, + + /* U+0106 "Ć" */ + 0x10, 0x80, 0x1e, 0x8a, 0x8, 0x20, 0x86, 0x27, 0x80, + + /* U+0107 "ć" */ + 0x20, 0x1d, 0x18, 0x42, 0x2e, + + /* U+0108 "Ĉ" */ + 0x1, 0xc0, 0x1e, 0x8a, 0x8, 0x20, 0x86, 0x27, 0x80, + + /* U+0109 "ĉ" */ + 0x60, 0x1d, 0x18, 0x42, 0x2e, + + /* U+010A "Ċ" */ + 0x10, 0x7, 0xa2, 0x82, 0x8, 0x21, 0x89, 0xe0, + + /* U+010B "ċ" */ + 0x20, 0x1d, 0x18, 0x42, 0x2e, + + /* U+010C "Č" */ + 0x40, 0xc0, 0x1e, 0x8a, 0x8, 0x20, 0x86, 0x27, 0x80, + + /* U+010D "č" */ + 0x51, 0x1d, 0x18, 0x42, 0x2e, + + /* U+010E "Ď" */ + 0x60, 0x3d, 0x28, 0xc6, 0x31, 0x97, 0x80, + + /* U+010F "ď" */ + 0xc, 0x27, 0xa2, 0x8a, 0x28, 0x9e, + + /* U+0110 "Đ" */ + 0x79, 0x24, 0x79, 0x45, 0x14, 0x9e, + + /* U+0111 "đ" */ + 0x3c, 0x27, 0xa2, 0x8a, 0x28, 0x9e, + + /* U+0112 "Ē" */ + 0x70, 0x3f, 0x8, 0x7a, 0x10, 0x87, 0xc0, + + /* U+0113 "ē" */ + 0x70, 0x1d, 0x1f, 0xc2, 0xe, + + /* U+0114 "Ĕ" */ + 0x91, 0x3f, 0x8, 0x7a, 0x10, 0x87, 0xc0, + + /* U+0115 "ĕ" */ + 0x30, 0x1d, 0x1f, 0xc2, 0xe, + + /* U+0116 "Ė" */ + 0x0, 0x3f, 0x8, 0x7a, 0x10, 0x87, 0xc0, + + /* U+0117 "ė" */ + 0x20, 0x1d, 0x1f, 0xc2, 0xe, + + /* U+0118 "Ę" */ + 0xfc, 0x21, 0xe8, 0x42, 0x1f, 0x10, 0xc0, + + /* U+0119 "ę" */ + 0x74, 0x7f, 0x8, 0x38, 0x86, + + /* U+011A "Ě" */ + 0x61, 0x3f, 0x8, 0x7a, 0x10, 0x87, 0xc0, + + /* U+011B "ě" */ + 0x51, 0x1d, 0x1f, 0xc2, 0xe, + + /* U+011C "Ĝ" */ + 0x0, 0xc0, 0x1e, 0x86, 0x8, 0x27, 0x86, 0x17, 0x80, + + /* U+011D "ĝ" */ + 0x60, 0x1f, 0x18, 0xc6, 0x2f, 0xb, 0x80, + + /* U+011E "Ğ" */ + 0x50, 0xc7, 0xa1, 0x82, 0x9, 0xe1, 0x85, 0xe0, + + /* U+011F "ğ" */ + 0x70, 0x1f, 0x18, 0xc6, 0x2f, 0xb, 0x80, + + /* U+0120 "Ġ" */ + 0x20, 0x7, 0xa1, 0x82, 0x9, 0xe1, 0x85, 0xe0, + + /* U+0121 "ġ" */ + 0x20, 0x1f, 0x18, 0xc6, 0x2f, 0xb, 0x80, + + /* U+0122 "Ģ" */ + 0x7a, 0x18, 0x20, 0x9e, 0x18, 0x5e, 0x10, 0x40, + + /* U+0123 "ģ" */ + 0x21, 0x0, 0xf8, 0xc6, 0x31, 0x78, 0x5c, + + /* U+0124 "Ĥ" */ + 0x31, 0x8, 0x61, 0x87, 0xf8, 0x61, 0x86, 0x10, + + /* U+0125 "ĥ" */ + 0x4a, 0x88, 0xe9, 0x99, 0x99, + + /* U+0126 "Ħ" */ + 0x85, 0xb, 0xff, 0xe8, 0x50, 0xa1, 0x42, + + /* U+0127 "ħ" */ + 0xe2, 0x1c, 0x94, 0xa5, 0x29, + + /* U+E1CB "" */ + 0x7f, 0x6, 0xc, 0x21, 0xad, 0x19, 0x3c, 0x98, 0xb5, 0x84, 0x30, 0x60, 0xfe, + + /* U+E1CC "" */ + 0xc0, 0x1, 0xf8, 0x24, 0x61, 0x11, 0x68, 0x69, 0xe5, 0xc5, 0xa2, 0x21, 0x8b, + 0x7, 0x30, 0x0, 0xc0, + + /* U+E29E "" */ + 0x7, 0x0, 0x91, 0x1, 0x48, 0x18, 0x83, 0x0, 0x60, 0xa, 0x2, 0x20, 0x83, + 0xe0, + + /* U+F1EB "" */ + 0x1f, 0x83, 0x3, 0x30, 0x4, 0x1f, 0x3, 0xc, 0x0, 0x0, 0x0, 0x0, 0xc0, 0x0, + 0x0, + + /* U+F354 "" */ + 0x38, 0x28, 0x28, 0x28, 0xee, 0x82, 0x44, 0x28, 0x10, + + /* U+F357 "" */ + 0x8, 0x14, 0x22, 0x41, 0x77, 0x14, 0x14, 0x14, 0x1c, + + /* U+F6AA "" */ + 0x30, + + /* U+F6AB "" */ + 0x3c, 0xc3, 0x0, 0x0, 0x18, 0x18}; + +/*--------------------- + * GLYPH DESCRIPTION + *--------------------*/ + +static const lv_font_fmt_txt_glyph_dsc_t app_10_glyph_dsc[] = { + {.bitmap_index = 0, + .adv_w = 0, + .box_w = 0, + .box_h = 0, + .ofs_x = 0, + .ofs_y = 0} /* id = 0 reserved */, + {.bitmap_index = 0, + .adv_w = 0, + .box_w = 1, + .box_h = 1, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 1, + .adv_w = 0, + .box_w = 1, + .box_h = 1, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 2, + .adv_w = 39, + .box_w = 1, + .box_h = 1, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 3, + .adv_w = 39, + .box_w = 1, + .box_h = 1, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 4, + .adv_w = 36, + .box_w = 1, + .box_h = 8, + .ofs_x = 1, + .ofs_y = 0}, + {.bitmap_index = 5, + .adv_w = 46, + .box_w = 2, + .box_h = 2, + .ofs_x = 0, + .ofs_y = 6}, + {.bitmap_index = 6, + .adv_w = 93, + .box_w = 6, + .box_h = 8, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 12, + .adv_w = 89, + .box_w = 5, + .box_h = 10, + .ofs_x = 0, + .ofs_y = -1}, + {.bitmap_index = 19, + .adv_w = 118, + .box_w = 7, + .box_h = 8, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 26, + .adv_w = 98, + .box_w = 6, + .box_h = 8, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 32, + .adv_w = 27, + .box_w = 1, + .box_h = 2, + .ofs_x = 0, + .ofs_y = 6}, + {.bitmap_index = 33, + .adv_w = 51, + .box_w = 3, + .box_h = 12, + .ofs_x = 0, + .ofs_y = -3}, + {.bitmap_index = 38, + .adv_w = 52, + .box_w = 3, + .box_h = 12, + .ofs_x = 0, + .ofs_y = -3}, + {.bitmap_index = 43, + .adv_w = 68, + .box_w = 4, + .box_h = 4, + .ofs_x = 0, + .ofs_y = 4}, + {.bitmap_index = 45, + .adv_w = 90, + .box_w = 5, + .box_h = 6, + .ofs_x = 0, + .ofs_y = 1}, + {.bitmap_index = 49, + .adv_w = 31, + .box_w = 1, + .box_h = 3, + .ofs_x = 1, + .ofs_y = -2}, + {.bitmap_index = 50, + .adv_w = 46, + .box_w = 3, + .box_h = 1, + .ofs_x = 0, + .ofs_y = 3}, + {.bitmap_index = 51, + .adv_w = 38, + .box_w = 1, + .box_h = 1, + .ofs_x = 1, + .ofs_y = 0}, + {.bitmap_index = 52, + .adv_w = 64, + .box_w = 4, + .box_h = 9, + .ofs_x = 0, + .ofs_y = -1}, + {.bitmap_index = 57, + .adv_w = 89, + .box_w = 5, + .box_h = 8, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 62, + .adv_w = 89, + .box_w = 3, + .box_h = 8, + .ofs_x = 1, + .ofs_y = 0}, + {.bitmap_index = 65, + .adv_w = 89, + .box_w = 5, + .box_h = 8, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 70, + .adv_w = 89, + .box_w = 5, + .box_h = 8, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 75, + .adv_w = 89, + .box_w = 5, + .box_h = 8, + .ofs_x = 1, + .ofs_y = 0}, + {.bitmap_index = 80, + .adv_w = 89, + .box_w = 4, + .box_h = 8, + .ofs_x = 1, + .ofs_y = 0}, + {.bitmap_index = 84, + .adv_w = 89, + .box_w = 5, + .box_h = 8, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 89, + .adv_w = 89, + .box_w = 5, + .box_h = 8, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 94, + .adv_w = 89, + .box_w = 5, + .box_h = 8, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 99, + .adv_w = 89, + .box_w = 5, + .box_h = 8, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 104, + .adv_w = 34, + .box_w = 1, + .box_h = 6, + .ofs_x = 1, + .ofs_y = 0}, + {.bitmap_index = 105, + .adv_w = 31, + .box_w = 1, + .box_h = 7, + .ofs_x = 1, + .ofs_y = -1}, + {.bitmap_index = 106, + .adv_w = 82, + .box_w = 4, + .box_h = 5, + .ofs_x = 1, + .ofs_y = 1}, + {.bitmap_index = 109, + .adv_w = 89, + .box_w = 4, + .box_h = 3, + .ofs_x = 1, + .ofs_y = 2}, + {.bitmap_index = 111, + .adv_w = 83, + .box_w = 4, + .box_h = 5, + .ofs_x = 1, + .ofs_y = 1}, + {.bitmap_index = 114, + .adv_w = 73, + .box_w = 4, + .box_h = 8, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 118, + .adv_w = 146, + .box_w = 9, + .box_h = 10, + .ofs_x = 0, + .ofs_y = -2}, + {.bitmap_index = 130, + .adv_w = 100, + .box_w = 6, + .box_h = 8, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 136, + .adv_w = 98, + .box_w = 5, + .box_h = 8, + .ofs_x = 1, + .ofs_y = 0}, + {.bitmap_index = 141, + .adv_w = 104, + .box_w = 6, + .box_h = 8, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 147, + .adv_w = 105, + .box_w = 5, + .box_h = 8, + .ofs_x = 1, + .ofs_y = 0}, + {.bitmap_index = 152, + .adv_w = 91, + .box_w = 5, + .box_h = 8, + .ofs_x = 1, + .ofs_y = 0}, + {.bitmap_index = 157, + .adv_w = 90, + .box_w = 5, + .box_h = 8, + .ofs_x = 1, + .ofs_y = 0}, + {.bitmap_index = 162, + .adv_w = 109, + .box_w = 6, + .box_h = 8, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 168, + .adv_w = 113, + .box_w = 6, + .box_h = 8, + .ofs_x = 1, + .ofs_y = 0}, + {.bitmap_index = 174, + .adv_w = 43, + .box_w = 1, + .box_h = 8, + .ofs_x = 1, + .ofs_y = 0}, + {.bitmap_index = 175, + .adv_w = 88, + .box_w = 5, + .box_h = 8, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 180, + .adv_w = 101, + .box_w = 5, + .box_h = 8, + .ofs_x = 1, + .ofs_y = 0}, + {.bitmap_index = 185, + .adv_w = 84, + .box_w = 4, + .box_h = 8, + .ofs_x = 1, + .ofs_y = 0}, + {.bitmap_index = 189, + .adv_w = 138, + .box_w = 7, + .box_h = 8, + .ofs_x = 1, + .ofs_y = 0}, + {.bitmap_index = 196, + .adv_w = 114, + .box_w = 6, + .box_h = 8, + .ofs_x = 1, + .ofs_y = 0}, + {.bitmap_index = 202, + .adv_w = 108, + .box_w = 6, + .box_h = 8, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 208, + .adv_w = 99, + .box_w = 5, + .box_h = 8, + .ofs_x = 1, + .ofs_y = 0}, + {.bitmap_index = 213, + .adv_w = 108, + .box_w = 6, + .box_h = 9, + .ofs_x = 0, + .ofs_y = -1}, + {.bitmap_index = 220, + .adv_w = 102, + .box_w = 5, + .box_h = 8, + .ofs_x = 1, + .ofs_y = 0}, + {.bitmap_index = 225, + .adv_w = 95, + .box_w = 5, + .box_h = 8, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 230, + .adv_w = 96, + .box_w = 5, + .box_h = 8, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 235, + .adv_w = 105, + .box_w = 5, + .box_h = 8, + .ofs_x = 1, + .ofs_y = 0}, + {.bitmap_index = 240, + .adv_w = 99, + .box_w = 6, + .box_h = 8, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 246, + .adv_w = 143, + .box_w = 9, + .box_h = 8, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 255, + .adv_w = 98, + .box_w = 6, + .box_h = 8, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 261, + .adv_w = 96, + .box_w = 5, + .box_h = 8, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 266, + .adv_w = 96, + .box_w = 5, + .box_h = 8, + .ofs_x = 1, + .ofs_y = 0}, + {.bitmap_index = 271, + .adv_w = 38, + .box_w = 2, + .box_h = 11, + .ofs_x = 1, + .ofs_y = -2}, + {.bitmap_index = 274, + .adv_w = 63, + .box_w = 4, + .box_h = 9, + .ofs_x = 0, + .ofs_y = -1}, + {.bitmap_index = 279, + .adv_w = 38, + .box_w = 2, + .box_h = 11, + .ofs_x = 0, + .ofs_y = -2}, + {.bitmap_index = 282, + .adv_w = 67, + .box_w = 4, + .box_h = 4, + .ofs_x = 0, + .ofs_y = 4}, + {.bitmap_index = 284, + .adv_w = 69, + .box_w = 4, + .box_h = 1, + .ofs_x = 0, + .ofs_y = -1}, + {.bitmap_index = 285, + .adv_w = 46, + .box_w = 2, + .box_h = 2, + .ofs_x = 0, + .ofs_y = 7}, + {.bitmap_index = 286, + .adv_w = 86, + .box_w = 4, + .box_h = 6, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 289, + .adv_w = 89, + .box_w = 5, + .box_h = 8, + .ofs_x = 1, + .ofs_y = 0}, + {.bitmap_index = 294, + .adv_w = 82, + .box_w = 5, + .box_h = 6, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 298, + .adv_w = 89, + .box_w = 5, + .box_h = 8, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 303, + .adv_w = 83, + .box_w = 5, + .box_h = 6, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 307, + .adv_w = 53, + .box_w = 3, + .box_h = 9, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 311, + .adv_w = 89, + .box_w = 5, + .box_h = 8, + .ofs_x = 0, + .ofs_y = -2}, + {.bitmap_index = 316, + .adv_w = 88, + .box_w = 4, + .box_h = 8, + .ofs_x = 1, + .ofs_y = 0}, + {.bitmap_index = 320, + .adv_w = 36, + .box_w = 1, + .box_h = 8, + .ofs_x = 1, + .ofs_y = 0}, + {.bitmap_index = 321, + .adv_w = 36, + .box_w = 2, + .box_h = 10, + .ofs_x = 0, + .ofs_y = -2}, + {.bitmap_index = 324, + .adv_w = 78, + .box_w = 4, + .box_h = 8, + .ofs_x = 1, + .ofs_y = 0}, + {.bitmap_index = 328, + .adv_w = 36, + .box_w = 1, + .box_h = 8, + .ofs_x = 1, + .ofs_y = 0}, + {.bitmap_index = 329, + .adv_w = 142, + .box_w = 7, + .box_h = 6, + .ofs_x = 1, + .ofs_y = 0}, + {.bitmap_index = 335, + .adv_w = 88, + .box_w = 4, + .box_h = 6, + .ofs_x = 1, + .ofs_y = 0}, + {.bitmap_index = 338, + .adv_w = 90, + .box_w = 5, + .box_h = 6, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 342, + .adv_w = 89, + .box_w = 5, + .box_h = 8, + .ofs_x = 1, + .ofs_y = -2}, + {.bitmap_index = 347, + .adv_w = 89, + .box_w = 5, + .box_h = 8, + .ofs_x = 0, + .ofs_y = -2}, + {.bitmap_index = 352, + .adv_w = 54, + .box_w = 3, + .box_h = 6, + .ofs_x = 1, + .ofs_y = 0}, + {.bitmap_index = 355, + .adv_w = 81, + .box_w = 4, + .box_h = 6, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 358, + .adv_w = 51, + .box_w = 3, + .box_h = 8, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 361, + .adv_w = 88, + .box_w = 4, + .box_h = 6, + .ofs_x = 1, + .ofs_y = 0}, + {.bitmap_index = 364, + .adv_w = 77, + .box_w = 5, + .box_h = 6, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 368, + .adv_w = 121, + .box_w = 7, + .box_h = 6, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 374, + .adv_w = 78, + .box_w = 5, + .box_h = 6, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 378, + .adv_w = 76, + .box_w = 5, + .box_h = 8, + .ofs_x = 0, + .ofs_y = -2}, + {.bitmap_index = 383, + .adv_w = 78, + .box_w = 4, + .box_h = 6, + .ofs_x = 1, + .ofs_y = 0}, + {.bitmap_index = 386, + .adv_w = 53, + .box_w = 3, + .box_h = 11, + .ofs_x = 0, + .ofs_y = -2}, + {.bitmap_index = 391, + .adv_w = 35, + .box_w = 1, + .box_h = 10, + .ofs_x = 1, + .ofs_y = -2}, + {.bitmap_index = 393, + .adv_w = 53, + .box_w = 3, + .box_h = 11, + .ofs_x = 0, + .ofs_y = -2}, + {.bitmap_index = 398, + .adv_w = 110, + .box_w = 6, + .box_h = 2, + .ofs_x = 1, + .ofs_y = 2}, + {.bitmap_index = 400, + .adv_w = 39, + .box_w = 1, + .box_h = 1, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 401, + .adv_w = 35, + .box_w = 1, + .box_h = 8, + .ofs_x = 1, + .ofs_y = -2}, + {.bitmap_index = 402, + .adv_w = 87, + .box_w = 5, + .box_h = 9, + .ofs_x = 0, + .ofs_y = -1}, + {.bitmap_index = 408, + .adv_w = 91, + .box_w = 5, + .box_h = 8, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 413, + .adv_w = 116, + .box_w = 6, + .box_h = 7, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 419, + .adv_w = 83, + .box_w = 5, + .box_h = 8, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 424, + .adv_w = 35, + .box_w = 1, + .box_h = 9, + .ofs_x = 1, + .ofs_y = -1}, + {.bitmap_index = 426, + .adv_w = 97, + .box_w = 5, + .box_h = 11, + .ofs_x = 0, + .ofs_y = -3}, + {.bitmap_index = 433, + .adv_w = 69, + .box_w = 3, + .box_h = 1, + .ofs_x = 1, + .ofs_y = 7}, + {.bitmap_index = 434, + .adv_w = 128, + .box_w = 8, + .box_h = 9, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 443, + .adv_w = 71, + .box_w = 3, + .box_h = 4, + .ofs_x = 1, + .ofs_y = 3}, + {.bitmap_index = 445, + .adv_w = 73, + .box_w = 3, + .box_h = 4, + .ofs_x = 1, + .ofs_y = 1}, + {.bitmap_index = 447, + .adv_w = 87, + .box_w = 4, + .box_h = 2, + .ofs_x = 1, + .ofs_y = 2}, + {.bitmap_index = 448, + .adv_w = 46, + .box_w = 3, + .box_h = 1, + .ofs_x = 0, + .ofs_y = 3}, + {.bitmap_index = 449, + .adv_w = 128, + .box_w = 8, + .box_h = 9, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 458, + .adv_w = 68, + .box_w = 3, + .box_h = 1, + .ofs_x = 1, + .ofs_y = 7}, + {.bitmap_index = 459, + .adv_w = 60, + .box_w = 3, + .box_h = 3, + .ofs_x = 0, + .ofs_y = 5}, + {.bitmap_index = 461, + .adv_w = 85, + .box_w = 5, + .box_h = 7, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 466, + .adv_w = 58, + .box_w = 3, + .box_h = 4, + .ofs_x = 0, + .ofs_y = 3}, + {.bitmap_index = 468, + .adv_w = 58, + .box_w = 3, + .box_h = 4, + .ofs_x = 0, + .ofs_y = 3}, + {.bitmap_index = 470, + .adv_w = 45, + .box_w = 1, + .box_h = 2, + .ofs_x = 1, + .ofs_y = 7}, + {.bitmap_index = 471, + .adv_w = 89, + .box_w = 4, + .box_h = 8, + .ofs_x = 1, + .ofs_y = -2}, + {.bitmap_index = 475, + .adv_w = 76, + .box_w = 4, + .box_h = 8, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 479, + .adv_w = 39, + .box_w = 1, + .box_h = 1, + .ofs_x = 1, + .ofs_y = 3}, + {.bitmap_index = 480, + .adv_w = 39, + .box_w = 1, + .box_h = 3, + .ofs_x = 1, + .ofs_y = -3}, + {.bitmap_index = 481, + .adv_w = 58, + .box_w = 2, + .box_h = 4, + .ofs_x = 0, + .ofs_y = 3}, + {.bitmap_index = 482, + .adv_w = 72, + .box_w = 4, + .box_h = 4, + .ofs_x = 0, + .ofs_y = 3}, + {.bitmap_index = 484, + .adv_w = 73, + .box_w = 3, + .box_h = 4, + .ofs_x = 1, + .ofs_y = 1}, + {.bitmap_index = 486, + .adv_w = 116, + .box_w = 6, + .box_h = 8, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 492, + .adv_w = 121, + .box_w = 7, + .box_h = 8, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 499, + .adv_w = 124, + .box_w = 6, + .box_h = 8, + .ofs_x = 1, + .ofs_y = 0}, + {.bitmap_index = 505, + .adv_w = 73, + .box_w = 4, + .box_h = 8, + .ofs_x = 0, + .ofs_y = -2}, + {.bitmap_index = 509, + .adv_w = 100, + .box_w = 6, + .box_h = 10, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 517, + .adv_w = 100, + .box_w = 6, + .box_h = 10, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 525, + .adv_w = 100, + .box_w = 6, + .box_h = 10, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 533, + .adv_w = 100, + .box_w = 6, + .box_h = 10, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 541, + .adv_w = 100, + .box_w = 6, + .box_h = 10, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 549, + .adv_w = 100, + .box_w = 6, + .box_h = 11, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 558, + .adv_w = 146, + .box_w = 8, + .box_h = 8, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 566, + .adv_w = 104, + .box_w = 5, + .box_h = 10, + .ofs_x = 0, + .ofs_y = -2}, + {.bitmap_index = 573, + .adv_w = 91, + .box_w = 5, + .box_h = 10, + .ofs_x = 1, + .ofs_y = 0}, + {.bitmap_index = 580, + .adv_w = 91, + .box_w = 5, + .box_h = 10, + .ofs_x = 1, + .ofs_y = 0}, + {.bitmap_index = 587, + .adv_w = 91, + .box_w = 5, + .box_h = 10, + .ofs_x = 1, + .ofs_y = 0}, + {.bitmap_index = 594, + .adv_w = 91, + .box_w = 5, + .box_h = 10, + .ofs_x = 1, + .ofs_y = 0}, + {.bitmap_index = 601, + .adv_w = 43, + .box_w = 2, + .box_h = 10, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 604, + .adv_w = 43, + .box_w = 2, + .box_h = 10, + .ofs_x = 1, + .ofs_y = 0}, + {.bitmap_index = 607, + .adv_w = 43, + .box_w = 3, + .box_h = 10, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 611, + .adv_w = 43, + .box_w = 3, + .box_h = 10, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 615, + .adv_w = 107, + .box_w = 6, + .box_h = 8, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 621, + .adv_w = 114, + .box_w = 6, + .box_h = 10, + .ofs_x = 1, + .ofs_y = 0}, + {.bitmap_index = 629, + .adv_w = 108, + .box_w = 6, + .box_h = 11, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 638, + .adv_w = 108, + .box_w = 6, + .box_h = 11, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 647, + .adv_w = 108, + .box_w = 6, + .box_h = 10, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 655, + .adv_w = 108, + .box_w = 6, + .box_h = 10, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 663, + .adv_w = 108, + .box_w = 6, + .box_h = 10, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 671, + .adv_w = 84, + .box_w = 5, + .box_h = 4, + .ofs_x = 0, + .ofs_y = 1}, + {.bitmap_index = 674, + .adv_w = 108, + .box_w = 6, + .box_h = 9, + .ofs_x = 0, + .ofs_y = -1}, + {.bitmap_index = 681, + .adv_w = 105, + .box_w = 5, + .box_h = 10, + .ofs_x = 1, + .ofs_y = 0}, + {.bitmap_index = 688, + .adv_w = 105, + .box_w = 5, + .box_h = 10, + .ofs_x = 1, + .ofs_y = 0}, + {.bitmap_index = 695, + .adv_w = 105, + .box_w = 5, + .box_h = 10, + .ofs_x = 1, + .ofs_y = 0}, + {.bitmap_index = 702, + .adv_w = 105, + .box_w = 5, + .box_h = 10, + .ofs_x = 1, + .ofs_y = 0}, + {.bitmap_index = 709, + .adv_w = 96, + .box_w = 5, + .box_h = 10, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 716, + .adv_w = 95, + .box_w = 5, + .box_h = 8, + .ofs_x = 1, + .ofs_y = 0}, + {.bitmap_index = 721, + .adv_w = 94, + .box_w = 5, + .box_h = 8, + .ofs_x = 1, + .ofs_y = 0}, + {.bitmap_index = 726, + .adv_w = 86, + .box_w = 4, + .box_h = 8, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 730, + .adv_w = 86, + .box_w = 4, + .box_h = 8, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 734, + .adv_w = 86, + .box_w = 4, + .box_h = 8, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 738, + .adv_w = 86, + .box_w = 4, + .box_h = 8, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 742, + .adv_w = 86, + .box_w = 4, + .box_h = 8, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 746, + .adv_w = 86, + .box_w = 4, + .box_h = 9, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 751, + .adv_w = 135, + .box_w = 8, + .box_h = 6, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 757, + .adv_w = 82, + .box_w = 5, + .box_h = 8, + .ofs_x = 0, + .ofs_y = -2}, + {.bitmap_index = 762, + .adv_w = 83, + .box_w = 5, + .box_h = 8, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 767, + .adv_w = 83, + .box_w = 5, + .box_h = 8, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 772, + .adv_w = 83, + .box_w = 5, + .box_h = 8, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 777, + .adv_w = 83, + .box_w = 5, + .box_h = 8, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 782, + .adv_w = 36, + .box_w = 2, + .box_h = 8, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 784, + .adv_w = 36, + .box_w = 2, + .box_h = 8, + .ofs_x = 1, + .ofs_y = 0}, + {.bitmap_index = 786, + .adv_w = 36, + .box_w = 3, + .box_h = 8, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 789, + .adv_w = 36, + .box_w = 3, + .box_h = 8, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 792, + .adv_w = 93, + .box_w = 5, + .box_h = 9, + .ofs_x = 1, + .ofs_y = 0}, + {.bitmap_index = 798, + .adv_w = 88, + .box_w = 4, + .box_h = 8, + .ofs_x = 1, + .ofs_y = 0}, + {.bitmap_index = 802, + .adv_w = 90, + .box_w = 5, + .box_h = 8, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 807, + .adv_w = 90, + .box_w = 5, + .box_h = 8, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 812, + .adv_w = 90, + .box_w = 5, + .box_h = 8, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 817, + .adv_w = 90, + .box_w = 5, + .box_h = 8, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 822, + .adv_w = 90, + .box_w = 5, + .box_h = 8, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 827, + .adv_w = 91, + .box_w = 5, + .box_h = 5, + .ofs_x = 0, + .ofs_y = 1}, + {.bitmap_index = 831, + .adv_w = 89, + .box_w = 5, + .box_h = 8, + .ofs_x = 0, + .ofs_y = -1}, + {.bitmap_index = 836, + .adv_w = 88, + .box_w = 4, + .box_h = 8, + .ofs_x = 1, + .ofs_y = 0}, + {.bitmap_index = 840, + .adv_w = 88, + .box_w = 4, + .box_h = 8, + .ofs_x = 1, + .ofs_y = 0}, + {.bitmap_index = 844, + .adv_w = 88, + .box_w = 4, + .box_h = 8, + .ofs_x = 1, + .ofs_y = 0}, + {.bitmap_index = 848, + .adv_w = 88, + .box_w = 4, + .box_h = 8, + .ofs_x = 1, + .ofs_y = 0}, + {.bitmap_index = 852, + .adv_w = 76, + .box_w = 5, + .box_h = 10, + .ofs_x = 0, + .ofs_y = -2}, + {.bitmap_index = 859, + .adv_w = 90, + .box_w = 5, + .box_h = 10, + .ofs_x = 1, + .ofs_y = -2}, + {.bitmap_index = 866, + .adv_w = 76, + .box_w = 5, + .box_h = 10, + .ofs_x = 0, + .ofs_y = -2}, + {.bitmap_index = 873, + .adv_w = 100, + .box_w = 6, + .box_h = 10, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 881, + .adv_w = 86, + .box_w = 4, + .box_h = 8, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 885, + .adv_w = 100, + .box_w = 7, + .box_h = 10, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 894, + .adv_w = 86, + .box_w = 4, + .box_h = 8, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 898, + .adv_w = 100, + .box_w = 6, + .box_h = 10, + .ofs_x = 0, + .ofs_y = -2}, + {.bitmap_index = 906, + .adv_w = 86, + .box_w = 4, + .box_h = 8, + .ofs_x = 0, + .ofs_y = -2}, + {.bitmap_index = 910, + .adv_w = 104, + .box_w = 6, + .box_h = 11, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 919, + .adv_w = 82, + .box_w = 5, + .box_h = 8, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 924, + .adv_w = 104, + .box_w = 6, + .box_h = 11, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 933, + .adv_w = 82, + .box_w = 5, + .box_h = 8, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 938, + .adv_w = 104, + .box_w = 6, + .box_h = 10, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 946, + .adv_w = 82, + .box_w = 5, + .box_h = 8, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 951, + .adv_w = 104, + .box_w = 6, + .box_h = 11, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 960, + .adv_w = 82, + .box_w = 5, + .box_h = 8, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 965, + .adv_w = 105, + .box_w = 5, + .box_h = 10, + .ofs_x = 1, + .ofs_y = 0}, + {.bitmap_index = 972, + .adv_w = 101, + .box_w = 6, + .box_h = 8, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 978, + .adv_w = 107, + .box_w = 6, + .box_h = 8, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 984, + .adv_w = 92, + .box_w = 6, + .box_h = 8, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 990, + .adv_w = 91, + .box_w = 5, + .box_h = 10, + .ofs_x = 1, + .ofs_y = 0}, + {.bitmap_index = 997, + .adv_w = 83, + .box_w = 5, + .box_h = 8, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 1002, + .adv_w = 91, + .box_w = 5, + .box_h = 10, + .ofs_x = 1, + .ofs_y = 0}, + {.bitmap_index = 1009, + .adv_w = 83, + .box_w = 5, + .box_h = 8, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 1014, + .adv_w = 91, + .box_w = 5, + .box_h = 10, + .ofs_x = 1, + .ofs_y = 0}, + {.bitmap_index = 1021, + .adv_w = 83, + .box_w = 5, + .box_h = 8, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 1026, + .adv_w = 91, + .box_w = 5, + .box_h = 10, + .ofs_x = 1, + .ofs_y = -2}, + {.bitmap_index = 1033, + .adv_w = 83, + .box_w = 5, + .box_h = 8, + .ofs_x = 0, + .ofs_y = -2}, + {.bitmap_index = 1038, + .adv_w = 91, + .box_w = 5, + .box_h = 10, + .ofs_x = 1, + .ofs_y = 0}, + {.bitmap_index = 1045, + .adv_w = 83, + .box_w = 5, + .box_h = 8, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 1050, + .adv_w = 109, + .box_w = 6, + .box_h = 11, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 1059, + .adv_w = 89, + .box_w = 5, + .box_h = 10, + .ofs_x = 0, + .ofs_y = -2}, + {.bitmap_index = 1066, + .adv_w = 109, + .box_w = 6, + .box_h = 10, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 1074, + .adv_w = 89, + .box_w = 5, + .box_h = 10, + .ofs_x = 0, + .ofs_y = -2}, + {.bitmap_index = 1081, + .adv_w = 109, + .box_w = 6, + .box_h = 10, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 1089, + .adv_w = 89, + .box_w = 5, + .box_h = 10, + .ofs_x = 0, + .ofs_y = -2}, + {.bitmap_index = 1096, + .adv_w = 109, + .box_w = 6, + .box_h = 10, + .ofs_x = 0, + .ofs_y = -2}, + {.bitmap_index = 1104, + .adv_w = 89, + .box_w = 5, + .box_h = 11, + .ofs_x = 0, + .ofs_y = -2}, + {.bitmap_index = 1111, + .adv_w = 113, + .box_w = 6, + .box_h = 10, + .ofs_x = 1, + .ofs_y = 0}, + {.bitmap_index = 1119, + .adv_w = 88, + .box_w = 4, + .box_h = 10, + .ofs_x = 1, + .ofs_y = 0}, + {.bitmap_index = 1124, + .adv_w = 110, + .box_w = 7, + .box_h = 8, + .ofs_x = 1, + .ofs_y = 0}, + {.bitmap_index = 1131, + .adv_w = 90, + .box_w = 5, + .box_h = 8, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 1136, + .adv_w = 200, + .box_w = 13, + .box_h = 8, + .ofs_x = 0, + .ofs_y = 0}, + {.bitmap_index = 1149, + .adv_w = 200, + .box_w = 13, + .box_h = 10, + .ofs_x = 0, + .ofs_y = -1}, + {.bitmap_index = 1166, + .adv_w = 160, + .box_w = 11, + .box_h = 10, + .ofs_x = 0, + .ofs_y = -1}, + {.bitmap_index = 1180, + .adv_w = 200, + .box_w = 13, + .box_h = 9, + .ofs_x = 0, + .ofs_y = -1}, + {.bitmap_index = 1195, + .adv_w = 120, + .box_w = 8, + .box_h = 9, + .ofs_x = 0, + .ofs_y = -1}, + {.bitmap_index = 1204, + .adv_w = 120, + .box_w = 8, + .box_h = 9, + .ofs_x = -1, + .ofs_y = -1}, + {.bitmap_index = 1213, + .adv_w = 40, + .box_w = 2, + .box_h = 3, + .ofs_x = 0, + .ofs_y = -1}, + {.bitmap_index = 1214, + .adv_w = 140, + .box_w = 8, + .box_h = 6, + .ofs_x = 0, + .ofs_y = -1}}; + +/*--------------------- + * CHARACTER MAPPING + *--------------------*/ + +static const uint16_t app_10_unicode_list_0[] = {0x0, 0x2, 0xd}; + +static const uint16_t app_10_unicode_list_3[] = { + 0x0, 0x1, 0xd3, 0x1020, 0x1189, 0x118c, 0x14df, 0x14e0}; + +/*Collect the unicode lists and glyph_id offsets*/ +static const lv_font_fmt_txt_cmap_t app_10_cmaps[] = { + {.range_start = 0, + .range_length = 14, + .glyph_id_start = 1, + .unicode_list = app_10_unicode_list_0, + .glyph_id_ofs_list = NULL, + .list_length = 3, + .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY}, + {.range_start = 32, + .range_length = 95, + .glyph_id_start = 4, + .unicode_list = NULL, + .glyph_id_ofs_list = NULL, + .list_length = 0, + .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY}, + {.range_start = 160, + .range_length = 136, + .glyph_id_start = 99, + .unicode_list = NULL, + .glyph_id_ofs_list = NULL, + .list_length = 0, + .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_TINY}, + {.range_start = 57803, + .range_length = 5345, + .glyph_id_start = 235, + .unicode_list = app_10_unicode_list_3, + .glyph_id_ofs_list = NULL, + .list_length = 8, + .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY}}; + +/*----------------- + * KERNING + *----------------*/ + +/*Map glyph_ids to kern left classes*/ +static const uint8_t app_10_kern_left_class_mapping[] = { + 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 2, 3, 0, 0, 0, 4, 0, 4, + 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, + 7, 8, 9, 10, 11, 0, 12, 12, 13, 14, 15, 12, 12, 9, 16, 17, 18, 0, 19, + 13, 20, 21, 22, 23, 24, 25, 0, 0, 0, 0, 0, 26, 27, 28, 0, 29, 30, 0, + 31, 0, 0, 32, 0, 31, 31, 33, 27, 0, 34, 0, 35, 0, 36, 37, 38, 36, 39, + 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 6, + 6, 6, 6, 6, 0, 8, 10, 10, 10, 10, 12, 12, 12, 12, 9, 12, 9, 9, 9, + 9, 9, 0, 0, 13, 13, 13, 13, 23, 0, 0, 26, 26, 26, 26, 26, 26, 0, 28, + 29, 29, 29, 29, 0, 0, 0, 0, 0, 31, 33, 33, 33, 33, 33, 0, 0, 0, 0, + 0, 0, 36, 27, 36, 6, 26, 6, 26, 6, 26, 8, 28, 8, 28, 8, 28, 8, 28, + 9, 0, 9, 0, 10, 29, 10, 29, 10, 29, 10, 29, 10, 29, 0, 0, 0, 0, 0, + 0, 0, 0, 12, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + +/*Map glyph_ids to kern right classes*/ +static const uint8_t app_10_kern_right_class_mapping[] = { + 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 3, 2, 0, 4, 5, 0, 6, 7, 6, + 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 10, + 0, 11, 0, 0, 0, 11, 0, 0, 12, 0, 0, 0, 0, 11, 0, 11, 0, 13, 14, + 15, 16, 17, 18, 19, 20, 0, 0, 21, 0, 0, 0, 22, 0, 23, 23, 23, 24, 23, + 0, 0, 0, 0, 0, 25, 25, 26, 25, 23, 27, 28, 29, 30, 31, 32, 33, 31, 34, + 0, 0, 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 36, 0, 7, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 37, 0, 0, 0, 0, 10, 10, + 10, 10, 10, 10, 38, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 11, 11, + 11, 11, 0, 11, 15, 15, 15, 15, 19, 0, 0, 22, 22, 22, 22, 22, 22, 39, 23, + 23, 23, 23, 23, 0, 0, 0, 0, 0, 25, 26, 26, 26, 26, 26, 0, 40, 30, 30, + 30, 30, 31, 0, 31, 10, 22, 10, 22, 10, 22, 11, 23, 11, 23, 11, 23, 11, 23, + 0, 23, 0, 0, 0, 23, 0, 23, 0, 23, 0, 23, 0, 23, 11, 23, 11, 23, 11, + 23, 11, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + +/*Kern values between classes*/ +static const int8_t app_10_kern_class_values[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -3, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, -8, 0, 0, 0, 0, 0, 0, + 0, -9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -4, -5, 0, + -2, -5, 0, -6, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, + 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, -13, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -17, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, -9, 0, 0, 0, 0, 0, 0, + -5, 0, -1, 0, 0, -10, -1, -7, -5, 0, -7, 0, 0, 0, 0, 0, + 0, -1, 0, 0, -1, -1, -4, -3, 0, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2, 0, -2, + 0, 0, -4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -2, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -8, 0, 0, 0, -2, 0, 0, 0, -2, 0, -2, + 0, -2, -3, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, + 0, -1, 0, 0, 0, -1, -2, -2, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -18, 0, 0, 0, -13, 0, -21, 0, 2, 0, 0, + 0, 0, 0, 0, 0, -3, -2, 0, 0, -2, -2, 0, 0, -2, -2, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 0, 0, 0, -2, 0, 0, 0, 1, -2, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, -2, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -5, 0, + 0, 0, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2, 0, + -2, -2, 0, 0, 0, -2, -3, -5, 0, 0, 0, 0, 0, 0, 0, 0, + 0, -26, 0, 0, 0, 0, 0, 0, 0, 1, -5, 0, 0, -21, -4, -14, + -11, 0, -19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -3, -10, -7, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -25, 0, 0, + 0, -11, 0, -16, 0, 0, 0, 0, 0, -2, 0, -2, 0, -1, -1, 0, + 0, -1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, -8, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -3, 0, -2, + -2, 0, -3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -6, 0, -1, 0, 0, -4, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + -3, 0, 0, 0, 0, -17, -18, 0, 0, -6, -2, -19, -1, 1, 0, 1, + 1, 0, 1, 0, 0, -9, -8, 0, -9, -8, -6, -9, 0, -7, -6, -4, + -6, -5, 0, -26, -17, -14, -9, -7, 0, 0, 0, 2, 0, -18, -3, 0, + 0, -6, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -4, -3, 0, + 0, -4, -2, 0, 0, -2, -1, 0, 0, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 0, -10, -5, 0, 0, -3, 0, 0, 0, 1, 0, 0, + 0, 0, 0, 0, 1, -3, -2, 0, 0, -2, -2, 0, 0, -1, 0, 0, + 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -4, 0, + 0, 0, -2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, -2, 0, + 0, -2, 0, 0, 0, -2, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, -2, 2, -4, -16, -4, 0, 0, -7, -2, -7, -1, 1, -7, 1, + 1, 1, 1, 0, 1, -6, -5, -2, -3, -5, -3, -5, -2, -3, -2, 0, + -2, -2, 1, -6, -4, -7, -5, -5, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2, 0, + 0, -2, 0, 0, 0, -1, -2, -2, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, -1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, -5, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, + -1, -1, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, -2, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, + 0, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, -11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, + -2, -1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, -10, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -3, -1, 1, + 0, -2, 0, 0, 4, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, -2, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, -8, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, 1, + 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2, 0, + 0, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, -1, 0, 0, -1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, -2, 0, 0, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + +/*Collect the kern class' data in one place*/ +static const lv_font_fmt_txt_kern_classes_t app_10_kern_classes = { + .class_pair_values = app_10_kern_class_values, + .left_class_mapping = app_10_kern_left_class_mapping, + .right_class_mapping = app_10_kern_right_class_mapping, + .left_class_cnt = 40, + .right_class_cnt = 40, +}; + +/*-------------------- + * ALL CUSTOM DATA + *--------------------*/ + +#if LV_VERSION_CHECK(8, 0, 0) +/*Store all the custom data of the font*/ +static lv_font_fmt_txt_glyph_cache_t app_10_cache; +static const lv_font_fmt_txt_dsc_t app_10_font_dsc = { +#else +static lv_font_fmt_txt_dsc_t font_dsc = { +#endif + .glyph_bitmap = app_10_glyph_bitmap, + .glyph_dsc = app_10_glyph_dsc, + .cmaps = app_10_cmaps, + .kern_dsc = &app_10_kern_classes, + .kern_scale = 16, + .cmap_num = 4, + .bpp = 1, + .kern_classes = 1, + .bitmap_format = 0, +#if LV_VERSION_CHECK(8, 0, 0) + .cache = &app_10_cache +#endif +}; + +/*----------------- + * PUBLIC FONT + *----------------*/ + +/*Initialize a public general font descriptor*/ +#if LV_VERSION_CHECK(8, 0, 0) +const lv_font_t app_10 = { +#else +lv_font_t app_10 = { +#endif + .get_glyph_dsc = + lv_font_get_glyph_dsc_fmt_txt, /*Function pointer to get glyph's data*/ + .get_glyph_bitmap = + lv_font_get_bitmap_fmt_txt, /*Function pointer to get glyph's bitmap*/ + .line_height = 14, /*The maximum line height required by the font*/ + .base_line = 3, /*Baseline measured from the bottom of the line*/ +#if !(LVGL_VERSION_MAJOR == 6 && LVGL_VERSION_MINOR == 0) + .subpx = LV_FONT_SUBPX_NONE, +#endif +#if LV_VERSION_CHECK(7, 4, 0) || LVGL_VERSION_MAJOR >= 8 + .underline_position = -1, + .underline_thickness = 0, +#endif + .dsc = &app_10_font_dsc /*The custom font data. Will be accessed by + `get_glyph_bitmap/dsc` */ +}; + +#endif /*#if APP_10*/ diff --git a/main/gui.c b/main/gui.c index f197f6f..c4ee307 100644 --- a/main/gui.c +++ b/main/gui.c @@ -8,6 +8,7 @@ #include "esp_err.h" #include "esp_log.h" #include "esp_timer.h" +#include "fonts/app_10.c" #include "freertos/FreeRTOS.h" #include "freertos/task.h" #include "lvgl.h" @@ -37,6 +38,10 @@ static const char *GUI_TAG = "LVGL_GUI"; // EE 8A 9E #define APP_TIMER_SYMBOL "\xEE\x8A\x9E" +// EF 8D 97 +#define APP_UP_SYMBOL "\xEF\x8D\x97" +// EF 8D 94 +#define APP_DOWN_SYMBOL "\xEF\x8D\x94" #define GUI_PANEL_TIMEOUT_US 3000000 // 3s @@ -88,6 +93,16 @@ static bool panel_locked = false; static lv_obj_t *scr; +typedef struct gui_network_speed_panel_s { + lv_obj_t *panel; + lv_obj_t *direct_upload_label; + lv_obj_t *direct_download_label; + lv_obj_t *proxy_upload_label; + lv_obj_t *proxy_download_label; +} gui_network_speed_panel_t; + +static gui_network_speed_panel_t *gui_network_speed_panel = NULL; + static void example_lvgl_rounder(lv_disp_drv_t *disp_drv, lv_area_t *area) { area->y1 = area->y1 & (~0x7); area->y2 = area->y2 | 0x7; @@ -326,6 +341,142 @@ static void gui_change_volume_level(int32_t target_value) { panel_locked = false; } +static void gui_network_speed_human_readable(uint64_t *speed, char *str) { + if (*speed > 1024 * 1024 * 1024) { + float v = (float)*speed / 1024.0f / 1024.0f / 1024.0f; + if (v >= 1000) { + sprintf(str, "% 5.0f GB/s", v); + } else if (v >= 100) { + sprintf(str, "% 5.1f GB/s", v); + } else { + sprintf(str, "% 5.2f GB/s", v); + } + } else if (*speed > 1024 * 1024) { + float v = (float)*speed / 1024.0f / 1024.0f; + if (v >= 1000) { + sprintf(str, "% 5.0f MB/s", v); + } else if (v >= 100) { + sprintf(str, "% 5.1f MB/s", v); + } else { + sprintf(str, "% 5.2f MB/s", v); + } + } else if (*speed > 1024) { + float v = (float)*speed / 1024.0f; + if (v >= 1000) { + sprintf(str, "% 5.0f KB/s", v); + } else if (v >= 100) { + sprintf(str, "% 5.1f KB/s", v); + } else { + sprintf(str, "% 5.2f KB/s", v); + } + } else { + sprintf(str, "% 5d B/s", (uint8_t)*speed); + } +} + +static void gui_update_network_label_style(lv_obj_t *label, uint64_t *speed) { + if (*speed > 1024 * 1024 * 50 / 8) { // 50 Mbps + lv_obj_set_style_bg_color(label, lv_color_black(), LV_PART_MAIN); + lv_obj_set_style_text_color(label, lv_color_white(), LV_PART_MAIN); + } else { + lv_obj_set_style_bg_color(label, lv_color_white(), LV_PART_MAIN); + lv_obj_set_style_text_color(label, lv_color_black(), LV_PART_MAIN); + } +} + +static void gui_change_network_speed(uint64_t *direct_upload_speed, + uint64_t *direct_download_speed, + uint64_t *proxy_upload_speed, + uint64_t *proxy_download_speed) { + if (gui_network_speed_panel == NULL) { + return; + } + static char str[32]; + + strcpy(str, APP_UP_SYMBOL); + gui_network_speed_human_readable(direct_upload_speed, &str[3]); + lv_label_set_text(gui_network_speed_panel->direct_upload_label, str); + gui_network_speed_human_readable(proxy_upload_speed, &str[3]); + lv_label_set_text(gui_network_speed_panel->proxy_upload_label, str); + + strcpy(str, APP_DOWN_SYMBOL); + gui_network_speed_human_readable(direct_download_speed, &str[3]); + lv_label_set_text(gui_network_speed_panel->direct_download_label, str); + gui_network_speed_human_readable(proxy_download_speed, &str[3]); + lv_label_set_text(gui_network_speed_panel->proxy_download_label, str); + + gui_update_network_label_style(gui_network_speed_panel->direct_upload_label, + direct_upload_speed); + gui_update_network_label_style(gui_network_speed_panel->direct_download_label, + direct_download_speed); + gui_update_network_label_style(gui_network_speed_panel->proxy_upload_label, + proxy_upload_speed); + gui_update_network_label_style(gui_network_speed_panel->proxy_download_label, + proxy_download_speed); +} + +static void gui_init_network_speed(lv_obj_t *scr) { + gui_network_speed_panel = + (gui_network_speed_panel_t *)malloc(sizeof(gui_network_speed_panel_t)); + + gui_network_speed_panel->panel = lv_obj_create(scr); + lv_obj_set_size(gui_network_speed_panel->panel, 128, 40); + lv_obj_align(gui_network_speed_panel->panel, LV_ALIGN_BOTTOM_MID, 0, 0); + lv_obj_set_style_bg_color(gui_network_speed_panel->panel, lv_color_white(), + LV_PART_MAIN); + lv_obj_set_style_border_color(gui_network_speed_panel->panel, + lv_color_black(), LV_PART_MAIN); + lv_obj_set_style_border_width(gui_network_speed_panel->panel, 1, + LV_PART_MAIN); + lv_obj_set_style_radius(gui_network_speed_panel->panel, 5, LV_PART_MAIN); + lv_obj_set_style_pad_hor(gui_network_speed_panel->panel, 1, LV_PART_MAIN); + lv_obj_set_style_pad_ver(gui_network_speed_panel->panel, 1, LV_PART_MAIN); + + gui_network_speed_panel->direct_upload_label = + lv_label_create(gui_network_speed_panel->panel); + lv_obj_align(gui_network_speed_panel->direct_upload_label, LV_ALIGN_TOP_LEFT, + 0, 0); + lv_obj_set_style_text_font(gui_network_speed_panel->direct_upload_label, + &app_10, LV_PART_MAIN); + lv_label_set_text(gui_network_speed_panel->direct_upload_label, + APP_UP_SYMBOL " 0.00 KB/s"); + lv_obj_set_style_bg_opa(gui_network_speed_panel->direct_upload_label, + LV_OPA_COVER, LV_PART_MAIN); + + gui_network_speed_panel->direct_download_label = + lv_label_create(gui_network_speed_panel->panel); + lv_obj_align(gui_network_speed_panel->direct_download_label, + LV_ALIGN_BOTTOM_LEFT, 0, 0); + lv_obj_set_style_text_font(gui_network_speed_panel->direct_download_label, + &app_10, LV_PART_MAIN); + lv_label_set_text(gui_network_speed_panel->direct_download_label, + APP_DOWN_SYMBOL " 0.00 KB/s"); + lv_obj_set_style_bg_opa(gui_network_speed_panel->direct_download_label, + LV_OPA_COVER, LV_PART_MAIN); + + gui_network_speed_panel->proxy_upload_label = + lv_label_create(gui_network_speed_panel->panel); + lv_obj_align(gui_network_speed_panel->proxy_upload_label, LV_ALIGN_TOP_RIGHT, + 0, 0); + lv_obj_set_style_text_font(gui_network_speed_panel->proxy_upload_label, + &app_10, LV_PART_MAIN); + lv_label_set_text(gui_network_speed_panel->proxy_upload_label, + APP_UP_SYMBOL " 0.00 KB/s"); + lv_obj_set_style_bg_opa(gui_network_speed_panel->proxy_upload_label, + LV_OPA_COVER, LV_PART_MAIN); + + gui_network_speed_panel->proxy_download_label = + lv_label_create(gui_network_speed_panel->panel); + lv_obj_align(gui_network_speed_panel->proxy_download_label, + LV_ALIGN_BOTTOM_RIGHT, 0, 0); + lv_obj_set_style_text_font(gui_network_speed_panel->proxy_download_label, + &app_10, LV_PART_MAIN); + lv_label_set_text(gui_network_speed_panel->proxy_download_label, + APP_DOWN_SYMBOL " 0.00 KB/s"); + lv_obj_set_style_bg_opa(gui_network_speed_panel->proxy_download_label, + LV_OPA_COVER, LV_PART_MAIN); +} + void gui_status_bar_create(lv_obj_t *scr) { // wifi icon wifi_label = lv_label_create(scr); @@ -370,6 +521,7 @@ void example_lvgl_demo_ui(lv_disp_t *disp) { lv_obj_align(label, LV_ALIGN_BOTTOM_RIGHT, 0, 0); gui_status_bar_create(scr); + gui_init_network_speed(scr); } static void gui_tick(void *pvParameters) { diff --git a/main/main.c b/main/main.c index a14b68f..694211a 100644 --- a/main/main.c +++ b/main/main.c @@ -14,6 +14,7 @@ #include "service_discovery.c" // #include "temperature.c" #include "desktop.c" +#include "net_gateway_monitor.c" #include "ui_input.c" #include "wifi.c" @@ -52,6 +53,7 @@ void app_main(void) { gui_set_wifi_disconnected(); } udp_server_init(); + net_gateway_monitor_init(); service_discovery_init(); // vTaskDelay(pdMS_TO_TICKS(1000)); // mqtt_app_start(); diff --git a/main/net_gateway_monitor.c b/main/net_gateway_monitor.c new file mode 100644 index 0000000..87c1d5e --- /dev/null +++ b/main/net_gateway_monitor.c @@ -0,0 +1,147 @@ +#include +#include +#include + +#include "esp_err.h" +#include "esp_event.h" +#include "esp_log.h" +#include "esp_netif.h" +#include "esp_system.h" +#include "esp_wifi.h" +#include "freertos/FreeRTOS.h" +#include "freertos/task.h" +#include "gui.c" +#include "lwip/err.h" +#include "lwip/sockets.h" +#include "lwip/sys.h" + +#define NET_GATEWAY_MONITOR_UDP_PORT 23043 +#define NET_GATEWAY_MONITOR_SERVER_ADDR 0xC0A81F05 // 192.168.31.5 +#define NET_GATEWAY_MONITOR_SERVER_PORT 17890 + +static const char *NET_GATEWAY_MONITOR_TAG = "NET_GATE_MONITOR"; +static int net_gateway_monitor_socket = -1; + +static void net_gateway_monitor_request_task(void *pvParameters) { + int sock = net_gateway_monitor_socket; + struct sockaddr_in server_addr; + server_addr.sin_addr.s_addr = htonl(NET_GATEWAY_MONITOR_SERVER_ADDR); + server_addr.sin_family = AF_INET; + server_addr.sin_port = htons(NET_GATEWAY_MONITOR_SERVER_PORT); + while (sock == net_gateway_monitor_socket) { + int err = sendto(net_gateway_monitor_socket, "ping", 4, 0, &server_addr, + sizeof(server_addr)); + if (err < 0) { + ESP_LOGE(NET_GATEWAY_MONITOR_TAG, + "Error occurred during sending: errno %d. sock: %d", errno, + net_gateway_monitor_socket); + } + vTaskDelay(5000 / portTICK_PERIOD_MS); + } + vTaskDelete(NULL); +} + +static void net_gateway_monitor_run_task(void *pvParameters) { + char rx_buffer[1024]; + char addr_str[128]; + int addr_family = (int)pvParameters; + int ip_protocol = 0; + struct sockaddr_in dest_addr; + struct sockaddr_in server_addr; + + while (1) { + dest_addr.sin_addr.s_addr = htonl(INADDR_ANY); + dest_addr.sin_family = AF_INET; + dest_addr.sin_port = htons(NET_GATEWAY_MONITOR_UDP_PORT); + ip_protocol = IPPROTO_IP; + + server_addr.sin_addr.s_addr = htonl(NET_GATEWAY_MONITOR_SERVER_ADDR); + server_addr.sin_family = AF_INET; + server_addr.sin_port = htons(NET_GATEWAY_MONITOR_SERVER_PORT); + + net_gateway_monitor_socket = socket(addr_family, SOCK_DGRAM, ip_protocol); + if (net_gateway_monitor_socket < 0) { + ESP_LOGE(NET_GATEWAY_MONITOR_TAG, + "Unable to create socket: errno %d. sock: %d", errno, + net_gateway_monitor_socket); + break; + } + ESP_LOGI(NET_GATEWAY_MONITOR_TAG, "Socket created"); + + // Set timeout + struct timeval timeout; + timeout.tv_sec = 10; + timeout.tv_usec = 0; + setsockopt(net_gateway_monitor_socket, SOL_SOCKET, SO_RCVTIMEO, &timeout, + sizeof timeout); + + int err = bind(net_gateway_monitor_socket, (struct sockaddr *)&dest_addr, + sizeof(dest_addr)); + if (err < 0) { + ESP_LOGE(NET_GATEWAY_MONITOR_TAG, + "Socket unable to bind: errno %d. sock: %d", errno, + net_gateway_monitor_socket); + net_gateway_monitor_socket = -1; + vTaskDelay(1000 / portTICK_PERIOD_MS); + continue; + } + // err = connect(net_gateway_monitor_socket, (struct sockaddr + // *)&server_addr, + // sizeof(server_addr)); + if (err < 0) { + ESP_LOGE(NET_GATEWAY_MONITOR_TAG, + "Socket unable to connect: errno %d. sock: %d", errno, + net_gateway_monitor_socket); + net_gateway_monitor_socket = -1; + vTaskDelay(1000 / portTICK_PERIOD_MS); + continue; + } + + ESP_LOGI(NET_GATEWAY_MONITOR_TAG, "Socket bound, port %d", + NET_GATEWAY_MONITOR_UDP_PORT); + + xTaskCreate(net_gateway_monitor_request_task, "net_gateway_monitor_request", + 1024, NULL, 5, NULL); + + while (1) { + uint8_t from_len = sizeof(server_addr); + // ESP_LOGI(NET_GATEWAY_MONITOR_TAG, "Waiting for data"); + int len = + recv(net_gateway_monitor_socket, rx_buffer, sizeof(rx_buffer) - 1, 0); + // Error occurred during receiving + if (len < 0) { + if (errno == EAGAIN) { + continue; + } + ESP_LOGE(NET_GATEWAY_MONITOR_TAG, "recvfrom failed: errno %d. len: %d", + errno, len); + } + // Data received + else { + // Get the sender's ip address as string + inet_ntoa_r(server_addr.sin_addr, addr_str, sizeof(addr_str) - 1); + + rx_buffer[len] = 0; // Null-terminate whatever we received and treat + // like a string... + gui_change_network_speed( + (uint64_t *)&rx_buffer[0], (uint64_t *)&rx_buffer[8], + (uint64_t *)&rx_buffer[16], (uint64_t *)&rx_buffer[24]); + } + + if (net_gateway_monitor_socket != -1 && len < 0) { + ESP_LOGE(NET_GATEWAY_MONITOR_TAG, + "Shutting down socket and restarting..."); + shutdown(net_gateway_monitor_socket, 0); + close(net_gateway_monitor_socket); + break; + } + } + } + vTaskDelete(NULL); +} + +static void net_gateway_monitor_init() { + ESP_LOGI(NET_GATEWAY_MONITOR_TAG, "Start net gateway monitor"); + xTaskCreate(net_gateway_monitor_run_task, "net_gateway_monitor_run", 4096, + (void *)AF_INET, 5, NULL); +}