Skip to content
GitLab
LSCloud-logo1
Created with Sketch.
LSCloud-logo2
Created with Sketch.
项目
项目组
代码片段
帮助
正在加载...
帮助
关于聆思
登录
切换导航
D
duomotai_ap
项目概览
项目概览
详情
动态
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
合并请求
11
合并请求
11
CI / CD
CI / CD
流水线
作业
计划
小工具
烧录包信息打印
烧录包校验
烧录包打包
生成LPK包
收起侧边栏
关闭侧边栏
动态
分支图
作业
提交
打开侧边栏
Duomotai
duomotai_ap
提交
9dbd4515
提交
9dbd4515
编写于
11个月前
作者:
jihaiyu
提交者:
叶康
11个月前
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
tools:factory:修改字体,解决字体卡死问题
上级
5abf8f99
变更
14
Hide whitespace changes
内联
并排
14 个文件被修改
(
119009 行新增
以及
136 行删除
)
+119009
-136
tools/factory_test/Kconfig
tools/factory_test/Kconfig
+1
-9
tools/factory_test/boards/csk6_duomotai_devkit.overlay
tools/factory_test/boards/csk6_duomotai_devkit.overlay
+16
-20
tools/factory_test/image/CMakeLists.txt
tools/factory_test/image/CMakeLists.txt
+0
-6
tools/factory_test/image/custom-sections.ld
tools/factory_test/image/custom-sections.ld
+0
-5
tools/factory_test/image/dsp_resource.h
tools/factory_test/image/dsp_resource.h
+0
-3
tools/factory_test/image/linker_flash_partitions.ld
tools/factory_test/image/linker_flash_partitions.ld
+0
-1
tools/factory_test/resource/cp_bin_files/venus_cp.bin
tools/factory_test/resource/cp_bin_files/venus_cp.bin
+0
-0
tools/factory_test/src/app_ui/lv_font/CMakeLists.txt
tools/factory_test/src/app_ui/lv_font/CMakeLists.txt
+1
-1
tools/factory_test/src/app_ui/lv_font/lv_font_chinese_18.c
tools/factory_test/src/app_ui/lv_font/lv_font_chinese_18.c
+0
-74
tools/factory_test/src/app_ui/lv_font/lv_font_chinese_22.c
tools/factory_test/src/app_ui/lv_font/lv_font_chinese_22.c
+118974
-0
tools/factory_test/src/check_dvp/ui/ui_dvp.c
tools/factory_test/src/check_dvp/ui/ui_dvp.c
+5
-5
tools/factory_test/src/check_key/ui/ui_key.c
tools/factory_test/src/check_key/ui/ui_key.c
+6
-6
tools/factory_test/src/check_lcd/ui/ui_lcd.c
tools/factory_test/src/check_lcd/ui/ui_lcd.c
+2
-2
tools/factory_test/src/common/ui_common/ui_common.c
tools/factory_test/src/common/ui_common/ui_common.c
+4
-4
未找到文件。
tools/factory_test/Kconfig
浏览文件 @
9dbd4515
# SPDX-License-Identifier: Apache-2.0
DT_CHOSEN_Z_FLASH_RES_LV_FONT :=resource,lv_font
menu "Example Configuration"
config EXAMPLE_WIFI_SSID
...
...
@@ -35,11 +35,3 @@ endif
rsource "Kconfig.capability"
source "Kconfig.zephyr"
config FLASH_RES_LV_FONT_CHINESE_ADDRESS
hex "algorithm resource data space start address"
default "$(dt_chosen_reg_addr_hex,$(DT_CHOSEN_Z_FLASH_RES_LV_FONT))"
config FLASH_RES_LV_FONT_CHINESE_SIZE
hex "algorithm resource data space size"
default "$(dt_chosen_reg_size_hex,$(DT_CHOSEN_Z_FLASH_RES_LV_FONT))"
This diff is collapsed.
Click to expand it.
tools/factory_test/boards/csk6_duomotai_devkit.overlay
浏览文件 @
9dbd4515
...
...
@@ -18,7 +18,6 @@
zephyr,code-partition = &ap_code_partition;
resource,cp = &cp_code_partition;
resource,littlefs = &littlefs_partition;
resource,lv_font=&lv_font_chinese_partition;
resource,wakeup_cae_mlp = &wakeup_cae_mlp_partition;
resource,wakeup_esr_mlp = &wakeup_esr_mlp_partition;
resource,wakeup_esr_main = &wakeup_esr_main_partition;
...
...
@@ -66,41 +65,38 @@
partitions {
ap_code_partition: partition@0 {
label = "ap_code";
reg = <0x00000 0x
2
00000>;
reg = <0x00000 0x
3
00000>;
};
cp_code_partition: partition@
2
00000 {
cp_code_partition: partition@
3
00000 {
label = "cp_code";
reg = <0x
2
00000 0x100000>;
reg = <0x
3
00000 0x100000>;
};
littlefs_partition: partition@
3
00000 {
littlefs_partition: partition@
4
00000 {
label = "littlefs_partition";
reg = < 0x
3
00000 0x10000 >;
reg = < 0x
4
00000 0x10000 >;
};
lv_font_chinese_partition: partition@310000 {
label = "lv_font_chinese";
reg = <0x310000 0x1c5d85>;
};
wakeup_cae_mlp_partition: partition@4f0000 {
wakeup_cae_mlp_partition: partition@410000 {
label = "wakeup_cae_mlp_partition";
reg = < 0x4
f
0000 1094112 >;
reg = < 0x4
1
0000 1094112 >;
};
wakeup_esr_mlp_partition: partition@
60
0000 {
wakeup_esr_mlp_partition: partition@
52
0000 {
label = "wakeup_esr_mlp_partition";
reg = < 0x
60
0000 905728 >;
reg = < 0x
52
0000 905728 >;
};
wakeup_esr_main_partition: partition@6
f
0000 {
wakeup_esr_main_partition: partition@6
0
0000 {
label = "wakeup_esr_main_partition";
reg = < 0x6
f
0000 208 >;
reg = < 0x6
0
0000 208 >;
};
wakeup_esr_cmds_partition: partition@6
f
1000 {
wakeup_esr_cmds_partition: partition@6
0
1000 {
label = "wakeup_esr_cmds_partition";
reg = < 0x6
f
1000 208 >;
reg = < 0x6
0
1000 208 >;
};
wakeup_ai_wrap_conf_partition: partition@6
f
2000 {
wakeup_ai_wrap_conf_partition: partition@6
0
2000 {
label = "wakeup_ai_wrap_conf_partition";
reg = < 0x6
f
2000 396 >;
reg = < 0x6
0
2000 396 >;
};
/* wifi driver private storage: 8Kb */
...
...
This diff is collapsed.
Click to expand it.
tools/factory_test/image/CMakeLists.txt
浏览文件 @
9dbd4515
...
...
@@ -28,12 +28,6 @@ app_generate_inc_file_for_target(
${
gen_dir
}
/littlefs.inc
res_image_dependencies
)
app_generate_inc_file_for_target
(
app
../resource/lv_font/lv_font_chinese_18.bin
${
gen_dir
}
/lv_font_chinese_18.inc
res_image_dependencies
)
app_generate_inc_file_for_target
(
...
...
This diff is collapsed.
Click to expand it.
tools/factory_test/image/custom-sections.ld
浏览文件 @
9dbd4515
...
...
@@ -10,11 +10,6 @@ SECTION_PROLOGUE(RES_LITTLEFS,,)
KEEP(*(".littlefs.text"));
} GROUP_LINK_IN(RES_LITTLEFS)
SECTION_PROLOGUE(RES_LV_FONT,,)
{
KEEP(*(".lv_font_chinese_18.text"));
} GROUP_LINK_IN(RES_LV_FONT)
#if defined(CONFIG_CAPABILITY_WAKEUP)
...
...
This diff is collapsed.
Click to expand it.
tools/factory_test/image/dsp_resource.h
浏览文件 @
9dbd4515
...
...
@@ -12,9 +12,6 @@ __attribute__((section(".littlefs.text"))) static const unsigned char littlefs[]
#include "littlefs.inc"
};
__attribute__
((
section
(
".lv_font_chinese_18.text"
)))
static
const
unsigned
char
lv_font_chinese_18
[]
=
{
#include "lv_font_chinese_18.inc"
};
#if defined(CONFIG_CAPABILITY_WAKEUP)
...
...
This diff is collapsed.
Click to expand it.
tools/factory_test/image/linker_flash_partitions.ld
浏览文件 @
9dbd4515
...
...
@@ -25,7 +25,6 @@ MEMORY
{
RES_VENUS_CP (r) : ORIGIN = (CONFIG_FLASH_BASE_ADDRESS + CONFIG_FLASH_RES_IMAGE_ADDRESS), LENGTH = CONFIG_FLASH_RES_IMAGE_SIZE
RES_LITTLEFS (r) : ORIGIN = (CONFIG_FLASH_BASE_ADDRESS + CONFIG_FLASH_RES_LITTLEFS_IMAGE_ADDRESS), LENGTH = CONFIG_FLASH_RES_LITTLEFS_IMAGE_SIZE
RES_LV_FONT (r) : ORIGIN = (CONFIG_FLASH_BASE_ADDRESS + CONFIG_FLASH_RES_LV_FONT_CHINESE_ADDRESS), LENGTH = CONFIG_FLASH_RES_LV_FONT_CHINESE_SIZE
#if defined(CONFIG_CAPABILITY_WAKEUP)
RES_WAKEUP_CAE_MLP (r) : ORIGIN = (CONFIG_FLASH_BASE_ADDRESS + CONFIG_FLASH_RES_WAKEUP_CAE_MLP_ADDRESS), LENGTH = CONFIG_FLASH_RES_WAKEUP_CAE_MLP_SIZE
RES_WAKEUP_ESR_MLP (r) : ORIGIN = (CONFIG_FLASH_BASE_ADDRESS + CONFIG_FLASH_RES_WAKEUP_ESR_MLP_ADDRESS), LENGTH = CONFIG_FLASH_RES_WAKEUP_ESR_MLP_SIZE
...
...
This diff is collapsed.
Click to expand it.
tools/factory_test/resource/cp_bin_files/venus_cp.bin
浏览文件 @
9dbd4515
无法预览此类型文件
This diff is collapsed.
Click to expand it.
tools/factory_test/src/app_ui/lv_font/CMakeLists.txt
浏览文件 @
9dbd4515
zephyr_include_directories
(
./
)
zephyr_library_sources
(
lv_font_chinese_
18
.c
lv_font_chinese_
22
.c
)
target_include_directories
(
app PRIVATE
...
...
This diff is collapsed.
Click to expand it.
tools/factory_test/src/app_ui/lv_font/lv_font_chinese_18.c
已删除
100644 → 0
浏览文件 @
5abf8f99
#include "lvgl.h"
#include <zephyr/kernel.h>
#include <zephyr/devicetree.h>
typedef
struct
{
uint16_t
min
;
uint16_t
max
;
uint8_t
bpp
;
uint8_t
reserved
[
3
];
}
x_header_t
;
typedef
struct
{
uint32_t
pos
;
}
x_table_t
;
typedef
struct
{
uint8_t
adv_w
;
uint8_t
box_w
;
uint8_t
box_h
;
int8_t
ofs_x
;
int8_t
ofs_y
;
uint8_t
r
;
}
glyph_dsc_t
;
static
x_header_t
__g_xbf_hd
=
{
.
min
=
0x0009
,
.
max
=
0xffe5
,
.
bpp
=
4
,
};
static
uint8_t
*
__user_font_getdata
(
int
offset
,
int
size
){
uint32_t
font_address
=
CONFIG_FLASH_BASE_ADDRESS
+
CONFIG_FLASH_RES_LV_FONT_CHINESE_ADDRESS
+
offset
;
return
(
uint8_t
*
)
font_address
;
}
static
const
uint8_t
*
__user_font_get_bitmap
(
const
lv_font_t
*
font
,
uint32_t
unicode_letter
)
{
if
(
unicode_letter
>
__g_xbf_hd
.
max
||
unicode_letter
<
__g_xbf_hd
.
min
)
{
return
NULL
;
}
uint32_t
unicode_offset
=
sizeof
(
x_header_t
)
+
(
unicode_letter
-
__g_xbf_hd
.
min
)
*
4
;
uint32_t
*
p_pos
=
(
uint32_t
*
)
__user_font_getdata
(
unicode_offset
,
4
);
if
(
p_pos
[
0
]
!=
0
)
{
uint32_t
pos
=
p_pos
[
0
];
glyph_dsc_t
*
gdsc
=
(
glyph_dsc_t
*
)
__user_font_getdata
(
pos
,
sizeof
(
glyph_dsc_t
));
return
__user_font_getdata
(
pos
+
sizeof
(
glyph_dsc_t
),
gdsc
->
box_w
*
gdsc
->
box_h
*
__g_xbf_hd
.
bpp
/
8
);
}
return
NULL
;
}
static
bool
__user_font_get_glyph_dsc
(
const
lv_font_t
*
font
,
lv_font_glyph_dsc_t
*
dsc_out
,
uint32_t
unicode_letter
,
uint32_t
unicode_letter_next
)
{
if
(
unicode_letter
>
__g_xbf_hd
.
max
||
unicode_letter
<
__g_xbf_hd
.
min
)
{
return
NULL
;
}
uint32_t
unicode_offset
=
sizeof
(
x_header_t
)
+
(
unicode_letter
-
__g_xbf_hd
.
min
)
*
4
;
uint32_t
*
p_pos
=
(
uint32_t
*
)
__user_font_getdata
(
unicode_offset
,
4
);
if
(
p_pos
[
0
]
!=
0
)
{
glyph_dsc_t
*
gdsc
=
(
glyph_dsc_t
*
)
__user_font_getdata
(
p_pos
[
0
],
sizeof
(
glyph_dsc_t
));
dsc_out
->
adv_w
=
gdsc
->
adv_w
;
dsc_out
->
box_h
=
gdsc
->
box_h
;
dsc_out
->
box_w
=
gdsc
->
box_w
;
dsc_out
->
ofs_x
=
gdsc
->
ofs_x
;
dsc_out
->
ofs_y
=
gdsc
->
ofs_y
;
dsc_out
->
bpp
=
__g_xbf_hd
.
bpp
;
return
true
;
}
return
false
;
}
lv_font_t
lv_font_chinese_18
=
{
.
get_glyph_bitmap
=
__user_font_get_bitmap
,
.
get_glyph_dsc
=
__user_font_get_glyph_dsc
,
.
line_height
=
32
,
.
base_line
=
0
,
};
This diff is collapsed.
Click to expand it.
tools/factory_test/src/app_ui/lv_font/lv_font_chinese_22.c
0 → 100644
浏览文件 @
9dbd4515
因为 它太大了无法显示 source diff 。您可以改为
查看blob
。
This diff is collapsed.
Click to expand it.
tools/factory_test/src/check_dvp/ui/ui_dvp.c
浏览文件 @
9dbd4515
...
...
@@ -52,7 +52,7 @@ ui_dvp_t *ui_dvp_get_ui_status(void)
}
static
ui_dvp_btn_click_listener
m_btn_click_listener
;
LV_FONT_DECLARE
(
lv_font_chinese_
18
);
LV_FONT_DECLARE
(
lv_font_chinese_
22
);
static
lv_obj_t
*
test_img
=
NULL
;
static
lv_obj_t
*
lv_dvp_test
=
NULL
;
...
...
@@ -118,7 +118,7 @@ static void ui_dvp_test_init(void *root_view, void *arg)
lv_label_set_text
(
ui_dvp_title_label
,
"请确认摄像头是否正常"
);
lv_obj_set_style_text_color
(
ui_dvp_title_label
,
lv_color_hex
(
0x00ff00
),
LV_PART_MAIN
|
LV_STATE_DEFAULT
);
lv_obj_set_style_text_opa
(
ui_dvp_title_label
,
255
,
LV_PART_MAIN
|
LV_STATE_DEFAULT
);
lv_obj_set_style_text_font
(
ui_dvp_title_label
,
&
lv_font_chinese_
18
,
LV_PART_MAIN
|
LV_STATE_DEFAULT
);
lv_obj_set_style_text_font
(
ui_dvp_title_label
,
&
lv_font_chinese_
22
,
LV_PART_MAIN
|
LV_STATE_DEFAULT
);
lv_obj_set_style_bg_color
(
ui_dvp_title_label
,
lv_color_hex
(
0xffffff
),
LV_STATE_DEFAULT
);
lv_dvp_ok_btn
=
lv_btn_create
(
lv_dvp_test
);
...
...
@@ -132,7 +132,7 @@ static void ui_dvp_test_init(void *root_view, void *arg)
lv_obj_t
*
lv_dvp_ok_txt
=
lv_label_create
(
lv_dvp_ok_btn
);
lv_label_set_text
(
lv_dvp_ok_txt
,
"是"
);
lv_obj_set_style_text_font
(
lv_dvp_ok_txt
,
&
lv_font_chinese_
18
,
LV_PART_MAIN
|
LV_STATE_DEFAULT
);
lv_obj_set_style_text_font
(
lv_dvp_ok_txt
,
&
lv_font_chinese_
22
,
LV_PART_MAIN
|
LV_STATE_DEFAULT
);
lv_obj_set_style_text_color
(
lv_dvp_ok_txt
,
lv_color_hex
(
0x0000ff
),
LV_PART_MAIN
|
LV_STATE_DEFAULT
);
lv_obj_center
(
lv_dvp_ok_txt
);
...
...
@@ -149,7 +149,7 @@ static void ui_dvp_test_init(void *root_view, void *arg)
lv_obj_t
*
lv_dvp_err_txt
=
lv_label_create
(
lv_dvp_err_btn
);
lv_label_set_text
(
lv_dvp_err_txt
,
"否"
);
lv_obj_set_style_text_font
(
lv_dvp_err_txt
,
&
lv_font_chinese_
18
,
LV_PART_MAIN
|
LV_STATE_DEFAULT
);
lv_obj_set_style_text_font
(
lv_dvp_err_txt
,
&
lv_font_chinese_
22
,
LV_PART_MAIN
|
LV_STATE_DEFAULT
);
lv_obj_set_style_text_color
(
lv_dvp_err_txt
,
lv_color_hex
(
0x0000ff
),
LV_PART_MAIN
|
LV_STATE_DEFAULT
);
lv_obj_center
(
lv_dvp_err_txt
);
lv_obj_add_event_cb
(
lv_dvp_err_btn
,
dvp_ui_event
,
LV_EVENT_PRESSED
,
NULL
);
...
...
@@ -160,7 +160,7 @@ static void ui_dvp_test_init(void *root_view, void *arg)
lv_label_set_text
(
lv_dvp_faild_txt
,
fail_lab
);
lv_obj_set_style_text_color
(
lv_dvp_faild_txt
,
lv_color_hex
(
0xff0000
),
LV_PART_MAIN
|
LV_STATE_DEFAULT
);
lv_obj_set_style_text_opa
(
lv_dvp_faild_txt
,
255
,
LV_PART_MAIN
|
LV_STATE_DEFAULT
);
lv_obj_set_style_text_font
(
lv_dvp_faild_txt
,
&
lv_font_chinese_
18
,
LV_PART_MAIN
|
LV_STATE_DEFAULT
);
lv_obj_set_style_text_font
(
lv_dvp_faild_txt
,
&
lv_font_chinese_
22
,
LV_PART_MAIN
|
LV_STATE_DEFAULT
);
lv_obj_set_style_bg_color
(
lv_dvp_faild_txt
,
lv_color_hex
(
0xffffff
),
LV_STATE_DEFAULT
);
lv_obj_add_flag
(
lv_dvp_faild_txt
,
LV_OBJ_FLAG_HIDDEN
);
}
...
...
This diff is collapsed.
Click to expand it.
tools/factory_test/src/check_key/ui/ui_key.c
浏览文件 @
9dbd4515
...
...
@@ -32,7 +32,7 @@ static ui_key_btn_click_listener m_btn_click_listener;
#define ROWS 2
#define COLS 2
static
lv_obj_t
*
block
[
COLS
*
ROWS
];
LV_FONT_DECLARE
(
lv_font_chinese_
18
);
LV_FONT_DECLARE
(
lv_font_chinese_
22
);
static
lv_obj_t
*
lv_key_test
=
NULL
;
static
lv_obj_t
*
lv_key_ok_btn
=
NULL
;
static
lv_obj_t
*
lv_key_err_btn
=
NULL
;
...
...
@@ -135,7 +135,7 @@ static void ui_key_test_init(void *root_view,void* null)
lv_label_set_text
(
ui_demo_title_label
,
"按下k1,k2,boot,k3按键点亮方块"
);
lv_obj_set_style_text_color
(
ui_demo_title_label
,
lv_color_hex
(
0xffffff
),
LV_PART_MAIN
|
LV_STATE_DEFAULT
);
lv_obj_set_style_text_opa
(
ui_demo_title_label
,
255
,
LV_PART_MAIN
|
LV_STATE_DEFAULT
);
lv_obj_set_style_text_font
(
ui_demo_title_label
,
&
lv_font_chinese_
18
,
LV_PART_MAIN
|
LV_STATE_DEFAULT
);
lv_obj_set_style_text_font
(
ui_demo_title_label
,
&
lv_font_chinese_
22
,
LV_PART_MAIN
|
LV_STATE_DEFAULT
);
lv_obj_set_style_bg_color
(
ui_demo_title_label
,
lv_color_hex
(
0x000000
),
LV_STATE_DEFAULT
);
ui_key_title_label
=
lv_label_create
(
lv_key_test
);
...
...
@@ -144,7 +144,7 @@ static void ui_key_test_init(void *root_view,void* null)
lv_label_set_text
(
ui_key_title_label
,
"请确认屏幕是否正常显示"
);
lv_obj_set_style_text_color
(
ui_key_title_label
,
lv_color_hex
(
0x00ff00
),
LV_PART_MAIN
|
LV_STATE_DEFAULT
);
lv_obj_set_style_text_opa
(
ui_key_title_label
,
255
,
LV_PART_MAIN
|
LV_STATE_DEFAULT
);
lv_obj_set_style_text_font
(
ui_key_title_label
,
&
lv_font_chinese_
18
,
LV_PART_MAIN
|
LV_STATE_DEFAULT
);
lv_obj_set_style_text_font
(
ui_key_title_label
,
&
lv_font_chinese_
22
,
LV_PART_MAIN
|
LV_STATE_DEFAULT
);
lv_obj_set_style_bg_color
(
ui_key_title_label
,
lv_color_hex
(
0xffffff
),
LV_STATE_DEFAULT
);
lv_obj_add_flag
(
ui_key_title_label
,
LV_OBJ_FLAG_HIDDEN
);
// 隐藏对象
...
...
@@ -160,7 +160,7 @@ static void ui_key_test_init(void *root_view,void* null)
lv_obj_t
*
lv_key_ok_txt
=
lv_label_create
(
lv_key_ok_btn
);
lv_label_set_text
(
lv_key_ok_txt
,
"是"
);
lv_obj_set_style_text_font
(
lv_key_ok_txt
,
&
lv_font_chinese_
18
,
LV_PART_MAIN
|
LV_STATE_DEFAULT
);
lv_obj_set_style_text_font
(
lv_key_ok_txt
,
&
lv_font_chinese_
22
,
LV_PART_MAIN
|
LV_STATE_DEFAULT
);
lv_obj_set_style_text_color
(
lv_key_ok_txt
,
lv_color_hex
(
0x0000ff
),
LV_PART_MAIN
|
LV_STATE_DEFAULT
);
lv_obj_center
(
lv_key_ok_txt
);
...
...
@@ -178,7 +178,7 @@ static void ui_key_test_init(void *root_view,void* null)
lv_obj_t
*
lv_key_err_txt
=
lv_label_create
(
lv_key_err_btn
);
lv_label_set_text
(
lv_key_err_txt
,
"否"
);
lv_obj_set_style_text_font
(
lv_key_err_txt
,
&
lv_font_chinese_
18
,
LV_PART_MAIN
|
LV_STATE_DEFAULT
);
lv_obj_set_style_text_font
(
lv_key_err_txt
,
&
lv_font_chinese_
22
,
LV_PART_MAIN
|
LV_STATE_DEFAULT
);
lv_obj_set_style_text_color
(
lv_key_err_txt
,
lv_color_hex
(
0xff0000
),
LV_PART_MAIN
|
LV_STATE_DEFAULT
);
lv_obj_center
(
lv_key_err_txt
);
lv_obj_add_event_cb
(
lv_key_err_btn
,
key_ui_event
,
LV_EVENT_PRESSED
,
NULL
);
...
...
@@ -188,7 +188,7 @@ static void ui_key_test_init(void *root_view,void* null)
lv_label_set_text
(
ui_key_err_label
,
fail_lab
);
lv_obj_set_style_text_color
(
ui_key_err_label
,
lv_color_hex
(
0x00ff00
),
LV_PART_MAIN
|
LV_STATE_DEFAULT
);
lv_obj_set_style_text_opa
(
ui_key_err_label
,
255
,
LV_PART_MAIN
|
LV_STATE_DEFAULT
);
lv_obj_set_style_text_font
(
ui_key_err_label
,
&
lv_font_chinese_
18
,
LV_PART_MAIN
|
LV_STATE_DEFAULT
);
lv_obj_set_style_text_font
(
ui_key_err_label
,
&
lv_font_chinese_
22
,
LV_PART_MAIN
|
LV_STATE_DEFAULT
);
lv_obj_set_style_bg_color
(
ui_key_err_label
,
lv_color_hex
(
0xffffff
),
LV_STATE_DEFAULT
);
lv_obj_add_flag
(
ui_key_err_label
,
LV_OBJ_FLAG_HIDDEN
);
// 隐藏对象
}
...
...
This diff is collapsed.
Click to expand it.
tools/factory_test/src/check_lcd/ui/ui_lcd.c
浏览文件 @
9dbd4515
...
...
@@ -113,7 +113,7 @@ int ui_lcd_get_rlt(void){
return
test_is_ok
;
}
static
lv_obj_t
*
lv_lvgl_test
=
NULL
;
LV_FONT_DECLARE
(
lv_font_chinese_
18
);
LV_FONT_DECLARE
(
lv_font_chinese_
22
);
static
void
ui_lvgl_test_init
(
void
*
root_view
,
void
*
arg
)
{
lv_obj_t
*
lv_root_view
=
(
lv_obj_t
*
)
root_view
;
...
...
@@ -135,7 +135,7 @@ static void ui_lvgl_test_init(void *root_view,void *arg)
lv_label_set_text
(
ui_demo_title_label
,
"请滑动屏幕使方块消失"
);
lv_obj_set_style_text_color
(
ui_demo_title_label
,
lv_color_hex
(
0xff0000
),
LV_PART_MAIN
|
LV_STATE_DEFAULT
);
lv_obj_set_style_text_opa
(
ui_demo_title_label
,
255
,
LV_PART_MAIN
|
LV_STATE_DEFAULT
);
lv_obj_set_style_text_font
(
ui_demo_title_label
,
&
lv_font_chinese_
18
,
LV_PART_MAIN
|
LV_STATE_DEFAULT
);
lv_obj_set_style_text_font
(
ui_demo_title_label
,
&
lv_font_chinese_
22
,
LV_PART_MAIN
|
LV_STATE_DEFAULT
);
lv_obj_set_style_bg_color
(
ui_demo_title_label
,
lv_color_hex
(
0xffffff
),
LV_STATE_DEFAULT
);
}
...
...
This diff is collapsed.
Click to expand it.
tools/factory_test/src/common/ui_common/ui_common.c
浏览文件 @
9dbd4515
...
...
@@ -16,7 +16,7 @@ LOG_MODULE_DECLARE(factory_test);
#define LV_COLOR_WHITE lv_color_hex(0x000000)
LV_FONT_DECLARE
(
lv_font_chinese_
18
);
LV_FONT_DECLARE
(
lv_font_chinese_
22
);
static
ui_common_config_t
*
m_ui_config
=
NULL
;
static
lv_obj_t
*
lv_root_view
=
NULL
;
...
...
@@ -67,7 +67,7 @@ static void create_btn(lv_obj_t *root, const char *text, lv_align_t align)
lv_obj_t
*
btn_label
=
lv_label_create
(
btn
);
// 创建按钮的标签
lv_label_set_text
(
btn_label
,
text
);
// 设置按钮的标签文本
lv_obj_set_style_text_font
(
btn_label
,
&
lv_font_chinese_
18
,
LV_PART_MAIN
|
LV_STATE_DEFAULT
);
lv_obj_set_style_text_font
(
btn_label
,
&
lv_font_chinese_
22
,
LV_PART_MAIN
|
LV_STATE_DEFAULT
);
lv_obj_center
(
btn_label
);
lv_obj_add_style
(
btn_label
,
&
style_white_text
,
0
);
...
...
@@ -79,7 +79,7 @@ static void create_label(lv_obj_t *root, const char *tip_label_text)
// 创建按钮标签
lv_obj_t
*
label
=
lv_label_create
(
root
);
lv_label_set_text
(
label
,
tip_label_text
);
lv_obj_set_style_text_font
(
label
,
&
lv_font_chinese_
18
,
LV_PART_MAIN
|
LV_STATE_DEFAULT
);
lv_obj_set_style_text_font
(
label
,
&
lv_font_chinese_
22
,
LV_PART_MAIN
|
LV_STATE_DEFAULT
);
lv_obj_align
(
label
,
LV_ALIGN_BOTTOM_RIGHT
,
0
,
0
);
lv_obj_add_style
(
label
,
&
style_white_text
,
0
);
}
...
...
@@ -104,7 +104,7 @@ static void create_root_view(void)
lv_obj_clear_flag
(
lv_root_view
,
LV_OBJ_FLAG_SCROLLABLE
);
/// Flags
lv_obj_set_style_bg_color
(
lv_root_view
,
lv_color_hex
(
0x000000
),
LV_PART_MAIN
|
LV_STATE_DEFAULT
);
lv_obj_set_style_bg_opa
(
lv_root_view
,
255
,
LV_PART_MAIN
|
LV_STATE_DEFAULT
);
lv_obj_set_style_text_font
(
lv_root_view
,
&
lv_font_chinese_
18
,
LV_PART_MAIN
|
LV_STATE_DEFAULT
);
lv_obj_set_style_text_font
(
lv_root_view
,
&
lv_font_chinese_
22
,
LV_PART_MAIN
|
LV_STATE_DEFAULT
);
lv_scr_load
(
lv_root_view
);
}
...
...
This diff is collapsed.
Click to expand it.
编辑
预览
支持
Markdown
0%
请重试
or
添加新附件
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录