新增一键关机功能函数

This commit is contained in:
ipason 2025-04-23 16:30:27 +08:00
parent d21a703471
commit c54c1766b2
8 changed files with 224 additions and 103 deletions

View File

@ -47,5 +47,5 @@ ui_event_homePage.c
)
idf_component_register(SRCS ${SOURCES}
PRIV_REQUIRES driver lvgl FluxWifi FluxUart FluxSD FluxProtocol lwip esp_netif
PRIV_REQUIRES driver lvgl FluxWifi FluxUart FluxSD FluxProtocol lwip esp_netif FluxButton
INCLUDE_DIRS "." )

View File

@ -1,7 +1,7 @@
/*******************************************************************************
* Size: 14 px
* Bpp: 1
* Opts: --bpp 1 --size 14 --font C:/Users/jarvis/Documents/FluxDC/SquareLineProj/assets/MiSans-Normal.otf -o C:/Users/jarvis/Documents/FluxDC/SquareLineProj/assets\ui_font_MiSansN14.c --format lvgl -r 0x20-0x7f --symbols WIFI天气备忘录通讯录计算器文件游戏进度标称类型上限上下频率实测实测贪吃蛇二维码蓝牙遥控器电话邮
* Opts: --bpp 1 --size 14 --font C:/Users/jarvis/Documents/FluxDC/SquareLineProj/assets/MiSans-Normal.otf -o C:/Users/jarvis/Documents/FluxDC/SquareLineProj/assets\ui_font_MiSansN14.c --format lvgl -r 0x20-0x7f --symbols WIFI天气备忘录通讯录计算器文件游戏进度标称类型上限上下频率实测实测贪吃蛇二维码蓝牙遥控器电话邮强制关机
:SD卡相册信息wifi连接 --no-compress --no-prefilter
******************************************************************************/
@ -406,6 +406,11 @@ static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
0x7f, 0xfc, 0x94, 0x84, 0xa4, 0x45, 0x22, 0x29,
0x11, 0x49, 0xb4, 0xc0, 0x0, 0x0,
/* U+5236 "制" */
0x10, 0x2a, 0x5, 0x42, 0xde, 0x59, 0xb, 0xfd,
0x44, 0x28, 0x85, 0x7e, 0xaa, 0x55, 0x48, 0xab,
0x11, 0xe,
/* U+5361 "卡" */
0x4, 0x0, 0x40, 0x7, 0xe0, 0x40, 0x4, 0xf,
0xff, 0x4, 0x0, 0x40, 0x5, 0x80, 0x46, 0x4,
@ -471,6 +476,11 @@ static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
0xff, 0x10, 0x81, 0x8, 0x10, 0x82, 0x8, 0x60,
0x8c, 0x8,
/* U+5F3A "强" */
0xe7, 0xe2, 0x82, 0x2f, 0xee, 0x10, 0x81, 0x8,
0xff, 0xe9, 0x12, 0xff, 0x21, 0x2, 0x12, 0x2f,
0xfe, 0x1,
/* U+5F55 "录" */
0x7f, 0xc0, 0x4, 0x7f, 0xc0, 0x4, 0xff, 0xf4,
0x22, 0x62, 0x60, 0x58, 0x1d, 0x86, 0x44, 0x84,
@ -830,68 +840,70 @@ static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = {
{.bitmap_index = 849, .adv_w = 224, .box_w = 13, .box_h = 13, .ofs_x = 0, .ofs_y = -1},
{.bitmap_index = 871, .adv_w = 224, .box_w = 12, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 891, .adv_w = 224, .box_w = 13, .box_h = 13, .ofs_x = 0, .ofs_y = -2},
{.bitmap_index = 913, .adv_w = 224, .box_w = 12, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 933, .adv_w = 224, .box_w = 12, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 953, .adv_w = 224, .box_w = 12, .box_h = 13, .ofs_x = 0, .ofs_y = -1},
{.bitmap_index = 973, .adv_w = 224, .box_w = 12, .box_h = 13, .ofs_x = 0, .ofs_y = -1},
{.bitmap_index = 993, .adv_w = 224, .box_w = 12, .box_h = 12, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 913, .adv_w = 224, .box_w = 11, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 931, .adv_w = 224, .box_w = 12, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 951, .adv_w = 224, .box_w = 12, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 971, .adv_w = 224, .box_w = 12, .box_h = 13, .ofs_x = 0, .ofs_y = -1},
{.bitmap_index = 991, .adv_w = 224, .box_w = 12, .box_h = 13, .ofs_x = 0, .ofs_y = -1},
{.bitmap_index = 1011, .adv_w = 224, .box_w = 12, .box_h = 12, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1029, .adv_w = 224, .box_w = 12, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1049, .adv_w = 224, .box_w = 13, .box_h = 13, .ofs_x = 0, .ofs_y = -1},
{.bitmap_index = 1071, .adv_w = 224, .box_w = 12, .box_h = 12, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1089, .adv_w = 224, .box_w = 12, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1109, .adv_w = 224, .box_w = 11, .box_h = 12, .ofs_x = 2, .ofs_y = -1},
{.bitmap_index = 1126, .adv_w = 224, .box_w = 12, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1146, .adv_w = 224, .box_w = 12, .box_h = 12, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1029, .adv_w = 224, .box_w = 12, .box_h = 12, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1047, .adv_w = 224, .box_w = 12, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1067, .adv_w = 224, .box_w = 13, .box_h = 13, .ofs_x = 0, .ofs_y = -1},
{.bitmap_index = 1089, .adv_w = 224, .box_w = 12, .box_h = 12, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1107, .adv_w = 224, .box_w = 12, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1127, .adv_w = 224, .box_w = 11, .box_h = 12, .ofs_x = 2, .ofs_y = -1},
{.bitmap_index = 1144, .adv_w = 224, .box_w = 12, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1164, .adv_w = 224, .box_w = 12, .box_h = 12, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1182, .adv_w = 224, .box_w = 12, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1202, .adv_w = 224, .box_w = 13, .box_h = 13, .ofs_x = 0, .ofs_y = -1},
{.bitmap_index = 1224, .adv_w = 224, .box_w = 13, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1246, .adv_w = 224, .box_w = 12, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1266, .adv_w = 224, .box_w = 12, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1286, .adv_w = 224, .box_w = 12, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1306, .adv_w = 224, .box_w = 9, .box_h = 12, .ofs_x = 3, .ofs_y = -1},
{.bitmap_index = 1320, .adv_w = 224, .box_w = 12, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1340, .adv_w = 224, .box_w = 12, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1360, .adv_w = 224, .box_w = 13, .box_h = 13, .ofs_x = 0, .ofs_y = -1},
{.bitmap_index = 1382, .adv_w = 224, .box_w = 12, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1402, .adv_w = 224, .box_w = 13, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1424, .adv_w = 224, .box_w = 13, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1446, .adv_w = 224, .box_w = 12, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1466, .adv_w = 224, .box_w = 12, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1486, .adv_w = 224, .box_w = 12, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1506, .adv_w = 224, .box_w = 12, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1526, .adv_w = 224, .box_w = 12, .box_h = 12, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1544, .adv_w = 224, .box_w = 12, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1564, .adv_w = 224, .box_w = 12, .box_h = 13, .ofs_x = 2, .ofs_y = -1},
{.bitmap_index = 1584, .adv_w = 224, .box_w = 12, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1604, .adv_w = 224, .box_w = 12, .box_h = 14, .ofs_x = 1, .ofs_y = -2},
{.bitmap_index = 1625, .adv_w = 224, .box_w = 12, .box_h = 12, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1643, .adv_w = 224, .box_w = 12, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1663, .adv_w = 224, .box_w = 12, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1683, .adv_w = 224, .box_w = 11, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1701, .adv_w = 224, .box_w = 12, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1721, .adv_w = 224, .box_w = 12, .box_h = 12, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1739, .adv_w = 224, .box_w = 12, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1759, .adv_w = 224, .box_w = 12, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1779, .adv_w = 224, .box_w = 13, .box_h = 14, .ofs_x = 1, .ofs_y = -2},
{.bitmap_index = 1802, .adv_w = 224, .box_w = 13, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1824, .adv_w = 224, .box_w = 12, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1844, .adv_w = 224, .box_w = 12, .box_h = 13, .ofs_x = 0, .ofs_y = -1},
{.bitmap_index = 1864, .adv_w = 224, .box_w = 12, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1884, .adv_w = 224, .box_w = 12, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1904, .adv_w = 224, .box_w = 13, .box_h = 14, .ofs_x = 1, .ofs_y = -2},
{.bitmap_index = 1927, .adv_w = 224, .box_w = 13, .box_h = 13, .ofs_x = 0, .ofs_y = -1},
{.bitmap_index = 1949, .adv_w = 224, .box_w = 13, .box_h = 13, .ofs_x = 0, .ofs_y = -1},
{.bitmap_index = 1971, .adv_w = 224, .box_w = 13, .box_h = 12, .ofs_x = 0, .ofs_y = -1},
{.bitmap_index = 1991, .adv_w = 224, .box_w = 13, .box_h = 12, .ofs_x = 0, .ofs_y = -1},
{.bitmap_index = 2011, .adv_w = 224, .box_w = 12, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 2031, .adv_w = 224, .box_w = 12, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 2051, .adv_w = 224, .box_w = 11, .box_h = 13, .ofs_x = 2, .ofs_y = -1},
{.bitmap_index = 2069, .adv_w = 224, .box_w = 11, .box_h = 13, .ofs_x = 2, .ofs_y = -1},
{.bitmap_index = 2087, .adv_w = 224, .box_w = 12, .box_h = 12, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 2105, .adv_w = 224, .box_w = 12, .box_h = 14, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 2126, .adv_w = 224, .box_w = 13, .box_h = 13, .ofs_x = 1, .ofs_y = -1}
{.bitmap_index = 1182, .adv_w = 224, .box_w = 12, .box_h = 12, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1200, .adv_w = 224, .box_w = 12, .box_h = 12, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1218, .adv_w = 224, .box_w = 12, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1238, .adv_w = 224, .box_w = 13, .box_h = 13, .ofs_x = 0, .ofs_y = -1},
{.bitmap_index = 1260, .adv_w = 224, .box_w = 13, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1282, .adv_w = 224, .box_w = 12, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1302, .adv_w = 224, .box_w = 12, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1322, .adv_w = 224, .box_w = 12, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1342, .adv_w = 224, .box_w = 9, .box_h = 12, .ofs_x = 3, .ofs_y = -1},
{.bitmap_index = 1356, .adv_w = 224, .box_w = 12, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1376, .adv_w = 224, .box_w = 12, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1396, .adv_w = 224, .box_w = 13, .box_h = 13, .ofs_x = 0, .ofs_y = -1},
{.bitmap_index = 1418, .adv_w = 224, .box_w = 12, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1438, .adv_w = 224, .box_w = 13, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1460, .adv_w = 224, .box_w = 13, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1482, .adv_w = 224, .box_w = 12, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1502, .adv_w = 224, .box_w = 12, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1522, .adv_w = 224, .box_w = 12, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1542, .adv_w = 224, .box_w = 12, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1562, .adv_w = 224, .box_w = 12, .box_h = 12, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1580, .adv_w = 224, .box_w = 12, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1600, .adv_w = 224, .box_w = 12, .box_h = 13, .ofs_x = 2, .ofs_y = -1},
{.bitmap_index = 1620, .adv_w = 224, .box_w = 12, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1640, .adv_w = 224, .box_w = 12, .box_h = 14, .ofs_x = 1, .ofs_y = -2},
{.bitmap_index = 1661, .adv_w = 224, .box_w = 12, .box_h = 12, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1679, .adv_w = 224, .box_w = 12, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1699, .adv_w = 224, .box_w = 12, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1719, .adv_w = 224, .box_w = 11, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1737, .adv_w = 224, .box_w = 12, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1757, .adv_w = 224, .box_w = 12, .box_h = 12, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1775, .adv_w = 224, .box_w = 12, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1795, .adv_w = 224, .box_w = 12, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1815, .adv_w = 224, .box_w = 13, .box_h = 14, .ofs_x = 1, .ofs_y = -2},
{.bitmap_index = 1838, .adv_w = 224, .box_w = 13, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1860, .adv_w = 224, .box_w = 12, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1880, .adv_w = 224, .box_w = 12, .box_h = 13, .ofs_x = 0, .ofs_y = -1},
{.bitmap_index = 1900, .adv_w = 224, .box_w = 12, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1920, .adv_w = 224, .box_w = 12, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 1940, .adv_w = 224, .box_w = 13, .box_h = 14, .ofs_x = 1, .ofs_y = -2},
{.bitmap_index = 1963, .adv_w = 224, .box_w = 13, .box_h = 13, .ofs_x = 0, .ofs_y = -1},
{.bitmap_index = 1985, .adv_w = 224, .box_w = 13, .box_h = 13, .ofs_x = 0, .ofs_y = -1},
{.bitmap_index = 2007, .adv_w = 224, .box_w = 13, .box_h = 12, .ofs_x = 0, .ofs_y = -1},
{.bitmap_index = 2027, .adv_w = 224, .box_w = 13, .box_h = 12, .ofs_x = 0, .ofs_y = -1},
{.bitmap_index = 2047, .adv_w = 224, .box_w = 12, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 2067, .adv_w = 224, .box_w = 12, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 2087, .adv_w = 224, .box_w = 11, .box_h = 13, .ofs_x = 2, .ofs_y = -1},
{.bitmap_index = 2105, .adv_w = 224, .box_w = 11, .box_h = 13, .ofs_x = 2, .ofs_y = -1},
{.bitmap_index = 2123, .adv_w = 224, .box_w = 12, .box_h = 12, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 2141, .adv_w = 224, .box_w = 12, .box_h = 14, .ofs_x = 1, .ofs_y = -1},
{.bitmap_index = 2162, .adv_w = 224, .box_w = 13, .box_h = 13, .ofs_x = 1, .ofs_y = -1}
};
/*---------------------
@ -900,14 +912,15 @@ static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = {
static const uint16_t unicode_list_2[] = {
0x0, 0x1e09, 0x1e0a, 0x1e4f, 0x1e8b, 0x1e8d, 0x1ef5, 0x1fe0,
0x2172, 0x218b, 0x2360, 0x2402, 0x240c, 0x242e, 0x248b, 0x2667,
0x278a, 0x2906, 0x2928, 0x2b9d, 0x2df1, 0x2ea5, 0x2eff, 0x2f54,
0x2fd7, 0x306e, 0x320e, 0x33a4, 0x33a6, 0x3586, 0x35e4, 0x35f5,
0x371e, 0x372b, 0x3739, 0x3806, 0x3c13, 0x3c5f, 0x3d4a, 0x3d4e,
0x3e37, 0x4258, 0x4386, 0x4534, 0x46f7, 0x47ec, 0x4800, 0x49ef,
0x4b96, 0x4c7a, 0x4ef3, 0x4f6d, 0x54dc, 0x56c6, 0x59c7, 0x5ba0,
0x5bae, 0x5bbd, 0x5bd4, 0x5bdc, 0x5d29, 0x5fda, 0x5fdd, 0x6019,
0x6064, 0x60ad, 0x649e, 0x65ec, 0x65f3, 0x664f, 0x67f2, 0x6890
0x2172, 0x218b, 0x2235, 0x2360, 0x2402, 0x240c, 0x242e, 0x248b,
0x2667, 0x278a, 0x2906, 0x2928, 0x2b9d, 0x2df1, 0x2ea5, 0x2eff,
0x2f39, 0x2f54, 0x2fd7, 0x306e, 0x320e, 0x33a4, 0x33a6, 0x3586,
0x35e4, 0x35f5, 0x371e, 0x372b, 0x3739, 0x3806, 0x3c13, 0x3c5f,
0x3d4a, 0x3d4e, 0x3e37, 0x4258, 0x4386, 0x4534, 0x46f7, 0x47ec,
0x4800, 0x49ef, 0x4b96, 0x4c7a, 0x4ef3, 0x4f6d, 0x54dc, 0x56c6,
0x59c7, 0x5ba0, 0x5bae, 0x5bbd, 0x5bd4, 0x5bdc, 0x5d29, 0x5fda,
0x5fdd, 0x6019, 0x6064, 0x60ad, 0x649e, 0x65ec, 0x65f3, 0x664f,
0x67f2, 0x6890
};
/*Collect the unicode lists and glyph_id offsets*/
@ -923,7 +936,7 @@ static const lv_font_fmt_txt_cmap_t cmaps[] =
},
{
.range_start = 12289, .range_length = 26769, .glyph_id_start = 98,
.unicode_list = unicode_list_2, .glyph_id_ofs_list = NULL, .list_length = 72, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY
.unicode_list = unicode_list_2, .glyph_id_ofs_list = NULL, .list_length = 74, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY
}
};
@ -956,7 +969,7 @@ static const uint8_t kern_left_class_mapping[] =
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
};
/*Map glyph_ids to kern right classes*/
@ -983,7 +996,7 @@ static const uint8_t kern_right_class_mapping[] =
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
};
/*Kern values between classes*/

View File

@ -112,8 +112,8 @@ void ui_pageHome_screen_init(void)
ui_pageHome_panelRight = lv_obj_create(ui_pageHome_panelBody);
lv_obj_set_width(ui_pageHome_panelRight, 320);
lv_obj_set_height(ui_pageHome_panelRight, 360);
lv_obj_set_x(ui_pageHome_panelRight, 323);
lv_obj_set_y(ui_pageHome_panelRight, -37);
lv_obj_set_x(ui_pageHome_panelRight, 320);
lv_obj_set_y(ui_pageHome_panelRight, -33);
lv_obj_set_align(ui_pageHome_panelRight, LV_ALIGN_CENTER);
lv_obj_clear_flag(ui_pageHome_panelRight, LV_OBJ_FLAG_SCROLLABLE); /// Flags
lv_obj_set_style_radius(ui_pageHome_panelRight, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
@ -223,14 +223,14 @@ void ui_pageHome_screen_init(void)
lv_obj_set_width(ui_pageHome_imgbuttonDebug, 60);
lv_obj_set_height(ui_pageHome_imgbuttonDebug, 60);
lv_obj_set_x(ui_pageHome_imgbuttonDebug, -49);
lv_obj_set_y(ui_pageHome_imgbuttonDebug, -133);
lv_obj_set_y(ui_pageHome_imgbuttonDebug, -132);
lv_obj_set_align(ui_pageHome_imgbuttonDebug, LV_ALIGN_CENTER);
ui_pageHome_labelDebug = lv_label_create(ui_pageHome_panelRight);
lv_obj_set_width(ui_pageHome_labelDebug, LV_SIZE_CONTENT); /// 1
lv_obj_set_height(ui_pageHome_labelDebug, LV_SIZE_CONTENT); /// 1
lv_obj_set_x(ui_pageHome_labelDebug, -50);
lv_obj_set_y(ui_pageHome_labelDebug, -89);
lv_obj_set_y(ui_pageHome_labelDebug, -88);
lv_obj_set_align(ui_pageHome_labelDebug, LV_ALIGN_CENTER);
lv_label_set_text(ui_pageHome_labelDebug, "调试");
lv_obj_set_style_text_color(ui_pageHome_labelDebug, lv_color_hex(0xFCFBFB), LV_PART_MAIN | LV_STATE_DEFAULT);
@ -243,14 +243,14 @@ void ui_pageHome_screen_init(void)
lv_obj_set_width(ui_pageHome_imgbuttonFluxRead, 60);
lv_obj_set_height(ui_pageHome_imgbuttonFluxRead, 60);
lv_obj_set_x(ui_pageHome_imgbuttonFluxRead, 26);
lv_obj_set_y(ui_pageHome_imgbuttonFluxRead, -130);
lv_obj_set_y(ui_pageHome_imgbuttonFluxRead, -132);
lv_obj_set_align(ui_pageHome_imgbuttonFluxRead, LV_ALIGN_CENTER);
ui_pageHome_labelFluxRead = lv_label_create(ui_pageHome_panelRight);
lv_obj_set_width(ui_pageHome_labelFluxRead, LV_SIZE_CONTENT); /// 1
lv_obj_set_height(ui_pageHome_labelFluxRead, LV_SIZE_CONTENT); /// 1
lv_obj_set_x(ui_pageHome_labelFluxRead, 25);
lv_obj_set_y(ui_pageHome_labelFluxRead, -86);
lv_obj_set_y(ui_pageHome_labelFluxRead, -88);
lv_obj_set_align(ui_pageHome_labelFluxRead, LV_ALIGN_CENTER);
lv_label_set_text(ui_pageHome_labelFluxRead, "流量计");
lv_obj_set_style_text_color(ui_pageHome_labelFluxRead, lv_color_hex(0xFCFBFB), LV_PART_MAIN | LV_STATE_DEFAULT);
@ -261,13 +261,31 @@ void ui_pageHome_screen_init(void)
lv_obj_set_width(ui_pageHome_str1, LV_SIZE_CONTENT); /// 1
lv_obj_set_height(ui_pageHome_str1, LV_SIZE_CONTENT); /// 1
lv_obj_set_x(ui_pageHome_str1, 110);
lv_obj_set_y(ui_pageHome_str1, -84);
lv_obj_set_y(ui_pageHome_str1, -88);
lv_obj_set_align(ui_pageHome_str1, LV_ALIGN_CENTER);
lv_label_set_text(ui_pageHome_str1, "时钟");
lv_obj_set_style_text_color(ui_pageHome_str1, lv_color_hex(0xFCFBFB), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_opa(ui_pageHome_str1, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_font(ui_pageHome_str1, &ui_font_MiSansM, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_pageHome_SwitchShutOff3 = lv_switch_create(ui_pageHome_panelRight);
lv_obj_set_width(ui_pageHome_SwitchShutOff3, 60);
lv_obj_set_height(ui_pageHome_SwitchShutOff3, 30);
lv_obj_set_x(ui_pageHome_SwitchShutOff3, -116);
lv_obj_set_y(ui_pageHome_SwitchShutOff3, -43);
lv_obj_set_align(ui_pageHome_SwitchShutOff3, LV_ALIGN_CENTER);
ui_pageHome_labelShutOFF = lv_label_create(ui_pageHome_panelRight);
lv_obj_set_width(ui_pageHome_labelShutOFF, LV_SIZE_CONTENT); /// 1
lv_obj_set_height(ui_pageHome_labelShutOFF, LV_SIZE_CONTENT); /// 1
lv_obj_set_x(ui_pageHome_labelShutOFF, -116);
lv_obj_set_y(ui_pageHome_labelShutOFF, -9);
lv_obj_set_align(ui_pageHome_labelShutOFF, LV_ALIGN_CENTER);
lv_label_set_text(ui_pageHome_labelShutOFF, "关机");
lv_obj_set_style_text_color(ui_pageHome_labelShutOFF, lv_color_hex(0xFCFBFB), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_opa(ui_pageHome_labelShutOFF, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_text_font(ui_pageHome_labelShutOFF, &ui_font_MiSansM, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_pageHome_panelCenter = lv_obj_create(ui_pageHome_panelBody);
lv_obj_set_width(ui_pageHome_panelCenter, 297);
lv_obj_set_height(ui_pageHome_panelCenter, 430);
@ -1173,6 +1191,7 @@ void ui_pageHome_screen_init(void)
lv_obj_add_event_cb(ui_pageHome_labelDebug, ui_event_pageHome_labelDebug, LV_EVENT_ALL, NULL);
lv_obj_add_event_cb(ui_pageHome_imgbuttonFluxRead, ui_event_pageHome_imgbuttonFluxRead, LV_EVENT_ALL, NULL);
lv_obj_add_event_cb(ui_pageHome_labelFluxRead, ui_event_pageHome_labelFluxRead, LV_EVENT_ALL, NULL);
lv_obj_add_event_cb(ui_pageHome_SwitchShutOff3, ui_event_pageHome_SwitchShutOff3, LV_EVENT_ALL, NULL);
lv_obj_add_event_cb(ui_pageHome_buttonStartTestBS, ui_event_pageHome_buttonStartTestBS, LV_EVENT_ALL, NULL);
lv_obj_add_event_cb(ui_pageHome_DropdownTestTypeBS, ui_event_pageHome_DropdownTestTypeBS, LV_EVENT_ALL, NULL);
lv_obj_add_event_cb(ui_pageHome_buttonMinusBS, ui_event_pageHome_buttonMinusBS, LV_EVENT_ALL, NULL);

View File

@ -49,28 +49,19 @@ void ui_pageTime_screen_init(void)
lv_obj_set_style_border_color(ui_pageTime_Panel6, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
lv_obj_set_style_border_opa(ui_pageTime_Panel6, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_pageTime_Panel5 = lv_obj_create(ui_pageTime);
lv_obj_set_width(ui_pageTime_Panel5, 113);
lv_obj_set_height(ui_pageTime_Panel5, 64);
lv_obj_set_x(ui_pageTime_Panel5, -90);
lv_obj_set_y(ui_pageTime_Panel5, -148);
lv_obj_set_align(ui_pageTime_Panel5, LV_ALIGN_CENTER);
lv_obj_clear_flag(ui_pageTime_Panel5, LV_OBJ_FLAG_SCROLLABLE); /// Flags
ui_pageTime_Panel7 = lv_obj_create(ui_pageTime);
lv_obj_set_width(ui_pageTime_Panel7, 300);
lv_obj_set_height(ui_pageTime_Panel7, 147);
lv_obj_set_x(ui_pageTime_Panel7, 0);
lv_obj_set_y(ui_pageTime_Panel7, -109);
lv_obj_set_align(ui_pageTime_Panel7, LV_ALIGN_CENTER);
lv_obj_clear_flag(ui_pageTime_Panel7, LV_OBJ_FLAG_SCROLLABLE); /// Flags
ui_pageTime_time = lv_label_create(ui_pageTime_Panel5);
lv_obj_set_width(ui_pageTime_time, LV_SIZE_CONTENT); /// 1
lv_obj_set_height(ui_pageTime_time, LV_SIZE_CONTENT); /// 1
lv_obj_set_x(ui_pageTime_time, 1);
lv_obj_set_y(ui_pageTime_time, 0);
lv_obj_set_align(ui_pageTime_time, LV_ALIGN_CENTER);
lv_label_set_text(ui_pageTime_time, "12:10");
lv_obj_set_style_text_font(ui_pageTime_time, &lv_font_montserrat_24, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_pageTime_Panel1 = lv_obj_create(ui_pageTime);
ui_pageTime_Panel1 = lv_obj_create(ui_pageTime_Panel7);
lv_obj_set_width(ui_pageTime_Panel1, 171);
lv_obj_set_height(ui_pageTime_Panel1, 35);
lv_obj_set_x(ui_pageTime_Panel1, 64);
lv_obj_set_y(ui_pageTime_Panel1, -160);
lv_obj_set_x(ui_pageTime_Panel1, -56);
lv_obj_set_y(ui_pageTime_Panel1, 31);
lv_obj_set_align(ui_pageTime_Panel1, LV_ALIGN_CENTER);
lv_obj_clear_flag(ui_pageTime_Panel1, LV_OBJ_FLAG_SCROLLABLE); /// Flags
@ -83,8 +74,54 @@ void ui_pageTime_screen_init(void)
lv_label_set_text(ui_pageTime_date, "2025-3-28");
lv_obj_set_style_text_font(ui_pageTime_date, &lv_font_montserrat_14, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_pageTime_Panel5 = lv_obj_create(ui_pageTime_Panel7);
lv_obj_set_width(ui_pageTime_Panel5, 113);
lv_obj_set_height(ui_pageTime_Panel5, 64);
lv_obj_set_x(ui_pageTime_Panel5, -86);
lv_obj_set_y(ui_pageTime_Panel5, -34);
lv_obj_set_align(ui_pageTime_Panel5, LV_ALIGN_CENTER);
lv_obj_clear_flag(ui_pageTime_Panel5, LV_OBJ_FLAG_SCROLLABLE); /// Flags
ui_pageTime_time = lv_label_create(ui_pageTime_Panel5);
lv_obj_set_width(ui_pageTime_time, LV_SIZE_CONTENT); /// 1
lv_obj_set_height(ui_pageTime_time, LV_SIZE_CONTENT); /// 1
lv_obj_set_x(ui_pageTime_time, 1);
lv_obj_set_y(ui_pageTime_time, 0);
lv_obj_set_align(ui_pageTime_time, LV_ALIGN_CENTER);
lv_label_set_text(ui_pageTime_time, "12:10");
lv_obj_set_style_text_font(ui_pageTime_time, &lv_font_montserrat_24, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_pageTime_buttonForceShutOFF = lv_btn_create(ui_pageTime_Panel7);
lv_obj_set_width(ui_pageTime_buttonForceShutOFF, 100);
lv_obj_set_height(ui_pageTime_buttonForceShutOFF, 50);
lv_obj_set_x(ui_pageTime_buttonForceShutOFF, 60);
lv_obj_set_y(ui_pageTime_buttonForceShutOFF, -30);
lv_obj_set_align(ui_pageTime_buttonForceShutOFF, LV_ALIGN_CENTER);
ui_pageTime_Label9 = lv_label_create(ui_pageTime_buttonForceShutOFF);
lv_obj_set_width(ui_pageTime_Label9, LV_SIZE_CONTENT); /// 1
lv_obj_set_height(ui_pageTime_Label9, LV_SIZE_CONTENT); /// 1
lv_obj_set_align(ui_pageTime_Label9, LV_ALIGN_CENTER);
lv_label_set_text(ui_pageTime_Label9, "强制关机");
lv_obj_set_style_text_font(ui_pageTime_Label9, &ui_font_MiSansN14, LV_PART_MAIN | LV_STATE_DEFAULT);
ui_pageTime_SwitchShutOff = lv_switch_create(ui_pageTime);
lv_obj_set_width(ui_pageTime_SwitchShutOff, 60);
lv_obj_set_height(ui_pageTime_SwitchShutOff, 30);
lv_obj_set_x(ui_pageTime_SwitchShutOff, -59);
lv_obj_set_y(ui_pageTime_SwitchShutOff, 1);
lv_obj_set_align(ui_pageTime_SwitchShutOff, LV_ALIGN_CENTER);
ui_pageTime_SwitchShutOff1 = lv_switch_create(ui_pageTime);
lv_obj_set_width(ui_pageTime_SwitchShutOff1, 60);
lv_obj_set_height(ui_pageTime_SwitchShutOff1, 30);
lv_obj_set_x(ui_pageTime_SwitchShutOff1, -59);
lv_obj_set_y(ui_pageTime_SwitchShutOff1, 1);
lv_obj_set_align(ui_pageTime_SwitchShutOff1, LV_ALIGN_CENTER);
lv_obj_add_event_cb(ui_pageTime_imageHome3, ui_event_pageTime_imageHome3, LV_EVENT_ALL, NULL);
lv_obj_add_event_cb(ui_pageTime_panelHeader2, ui_event_pageTime_panelHeader2, LV_EVENT_ALL, NULL);
lv_obj_add_event_cb(ui_pageTime_Panel6, ui_event_pageTime_Panel6, LV_EVENT_ALL, NULL);
lv_obj_add_event_cb(ui_pageTime_buttonForceShutOFF, ui_event_pageTime_buttonForceShutOFF, LV_EVENT_ALL, NULL);
}

View File

@ -48,6 +48,9 @@ lv_obj_t * ui_pageHome_imgbuttonFluxRead;
void ui_event_pageHome_labelFluxRead(lv_event_t * e);
lv_obj_t * ui_pageHome_labelFluxRead;
lv_obj_t * ui_pageHome_str1;
void ui_event_pageHome_SwitchShutOff3(lv_event_t * e);
lv_obj_t * ui_pageHome_SwitchShutOff3;
lv_obj_t * ui_pageHome_labelShutOFF;
lv_obj_t * ui_pageHome_panelCenter;
void ui_event_pageHome_buttonStartTestBS(lv_event_t * e);
lv_obj_t * ui_pageHome_buttonStartTestBS;
@ -421,10 +424,16 @@ void ui_event_pageTime_imageHome3(lv_event_t * e);
lv_obj_t * ui_pageTime_imageHome3;
void ui_event_pageTime_Panel6(lv_event_t * e);
lv_obj_t * ui_pageTime_Panel6;
lv_obj_t * ui_pageTime_Panel5;
lv_obj_t * ui_pageTime_time;
lv_obj_t * ui_pageTime_Panel7;
lv_obj_t * ui_pageTime_Panel1;
lv_obj_t * ui_pageTime_date;
lv_obj_t * ui_pageTime_Panel5;
lv_obj_t * ui_pageTime_time;
void ui_event_pageTime_buttonForceShutOFF(lv_event_t * e);
lv_obj_t * ui_pageTime_buttonForceShutOFF;
lv_obj_t * ui_pageTime_Label9;
lv_obj_t * ui_pageTime_SwitchShutOff;
lv_obj_t * ui_pageTime_SwitchShutOff1;
// CUSTOM VARIABLES
// EVENTS
@ -525,6 +534,15 @@ void ui_event_pageHome_labelFluxRead(lv_event_t * e)
}
}
void ui_event_pageHome_SwitchShutOff3(lv_event_t * e)
{
lv_event_code_t event_code = lv_event_get_code(e);
if(event_code == LV_EVENT_VALUE_CHANGED) {
on_switchShutOff_valueChanged(e);
}
}
void ui_event_pageHome_buttonStartTestBS(lv_event_t * e)
{
lv_event_code_t event_code = lv_event_get_code(e);
@ -1165,6 +1183,15 @@ void ui_event_pageTime_Panel6(lv_event_t * e)
}
}
void ui_event_pageTime_buttonForceShutOFF(lv_event_t * e)
{
lv_event_code_t event_code = lv_event_get_code(e);
if(event_code == LV_EVENT_CLICKED) {
on_buttonForceShutOFF_Clicked(e);
}
}
void ui_event____initial_actions0(lv_event_t * e)
{
lv_event_code_t event_code = lv_event_get_code(e);

View File

@ -58,6 +58,9 @@ extern lv_obj_t * ui_pageHome_imgbuttonFluxRead;
void ui_event_pageHome_labelFluxRead(lv_event_t * e);
extern lv_obj_t * ui_pageHome_labelFluxRead;
extern lv_obj_t * ui_pageHome_str1;
void ui_event_pageHome_SwitchShutOff3(lv_event_t * e);
extern lv_obj_t * ui_pageHome_SwitchShutOff3;
extern lv_obj_t * ui_pageHome_labelShutOFF;
extern lv_obj_t * ui_pageHome_panelCenter;
void ui_event_pageHome_buttonStartTestBS(lv_event_t * e);
extern lv_obj_t * ui_pageHome_buttonStartTestBS;
@ -431,10 +434,16 @@ void ui_event_pageTime_imageHome3(lv_event_t * e);
extern lv_obj_t * ui_pageTime_imageHome3;
void ui_event_pageTime_Panel6(lv_event_t * e);
extern lv_obj_t * ui_pageTime_Panel6;
extern lv_obj_t * ui_pageTime_Panel5;
extern lv_obj_t * ui_pageTime_time;
extern lv_obj_t * ui_pageTime_Panel7;
extern lv_obj_t * ui_pageTime_Panel1;
extern lv_obj_t * ui_pageTime_date;
extern lv_obj_t * ui_pageTime_Panel5;
extern lv_obj_t * ui_pageTime_time;
void ui_event_pageTime_buttonForceShutOFF(lv_event_t * e);
extern lv_obj_t * ui_pageTime_buttonForceShutOFF;
extern lv_obj_t * ui_pageTime_Label9;
extern lv_obj_t * ui_pageTime_SwitchShutOff;
extern lv_obj_t * ui_pageTime_SwitchShutOff1;
// CUSTOM VARIABLES
// EVENTS

View File

@ -22,6 +22,8 @@
#include "FluxProtocol.h"
#include "Flux_Button.h"
#if CONFIG_WIFI_SCAN_ENABLE
/*包含SNTP的头文件*/
@ -196,3 +198,15 @@ void on_buttonTimeUpdate_clicked(lv_event_t * e)
{
/*不实现任何功能*/
}
void on_buttonForceShutOFF_Clicked(lv_event_t * e)
{
/* 一键关机 */
POWER_OFF;
}
void on_switchShutOff_valueChanged(lv_event_t * e)
{
/* 关机开关 */
POWER_OFF;
}

View File

@ -10,6 +10,7 @@
extern "C" {
#endif
void on_switchShutOff_valueChanged(lv_event_t * e);
void on_buttonStartTestBS_clicked(lv_event_t * e);
void on_dropdown_deviceTypeBS_valueChanged(lv_event_t * e);
void on_spinboxStageBS_valueChanged(lv_event_t * e);
@ -34,6 +35,7 @@ void on_buttonFluxStart_clicked(lv_event_t * e);
void on_buttonGetTime_clicked(lv_event_t * e);
void on_buttonFluxRead_clicked(lv_event_t * e);
void on_buttonClearTextarea_clicked(lv_event_t * e);
void on_buttonForceShutOFF_Clicked(lv_event_t * e);
void on_buttonTimeUpdate_clicked(lv_event_t * e);
#ifdef __cplusplus