系统页面存储配置
This commit is contained in:
1 parent
b190bf7727
commit
552a916705
6 files changed
+103
-78
No files matched your search
@@ -54,8 +54,8 @@ int read_sample(void)
|
|||||||
if (access(INI_config, F_OK) != 0)
|
if (access(INI_config, F_OK) != 0)
|
||||||
{
|
{
|
||||||
LOG_E("NOT 828config");
|
LOG_E("NOT 828config");
|
||||||
int fd = open(INI_config, O_WRONLY | O_CREAT);//创建文件
|
// int fd = open(INI_config, O_WRONLY | O_CREAT);//创建文件
|
||||||
close(fd);
|
// close(fd);
|
||||||
}
|
}
|
||||||
// 初始化INI解析器
|
// 初始化INI解析器
|
||||||
INI_File *ini = ini_init();
|
INI_File *ini = ini_init();
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2006-2021, RT-Thread Development Team
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Change Logs:
|
||||||
|
* Date Author Notes
|
||||||
|
* 2026-01-23 Administrator the first version
|
||||||
|
*/
|
||||||
|
#ifndef APPLICATIONS_INI_CONFIG_H_
|
||||||
|
#define APPLICATIONS_INI_CONFIG_H_
|
||||||
|
|
||||||
|
extern void write_sample(void);
|
||||||
|
|
||||||
|
#endif /* APPLICATIONS_INI_CONFIG_H_ */
|
||||||
@@ -15,6 +15,8 @@
|
|||||||
#include "freemaster_client.h"
|
#include "freemaster_client.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "INI/config.h"
|
||||||
|
#include "data/Variable.h"
|
||||||
|
|
||||||
static void screen_inf_img_event_handler (lv_event_t *e)
|
static void screen_inf_img_event_handler (lv_event_t *e)
|
||||||
{
|
{
|
||||||
@@ -217,6 +219,14 @@ static void screen_sys_save_event_handler (lv_event_t *e)
|
|||||||
switch (code) {
|
switch (code) {
|
||||||
case LV_EVENT_CLICKED:
|
case LV_EVENT_CLICKED:
|
||||||
{
|
{
|
||||||
|
|
||||||
|
const char* machine_ID_t = lv_textarea_get_text(guider_ui.screen_machine_id_rt);
|
||||||
|
strncpy(machine_ID, machine_ID_t,sizeof(machine_ID)-1);
|
||||||
|
machine_ID[sizeof(machine_ID)-1]='\0';
|
||||||
|
const char* machine_name_t = lv_textarea_get_text(guider_ui.screen_machine_name_rt);
|
||||||
|
strncpy(machine_name, machine_name_t,sizeof(machine_name)-1);
|
||||||
|
machine_name[sizeof(machine_name)-1]='\0';
|
||||||
|
write_sample();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -341,9 +341,9 @@ typedef struct
|
|||||||
lv_obj_t *screen_set_Save_label;
|
lv_obj_t *screen_set_Save_label;
|
||||||
lv_obj_t *screen_step_;
|
lv_obj_t *screen_step_;
|
||||||
lv_obj_t *screen_w_5;
|
lv_obj_t *screen_w_5;
|
||||||
lv_obj_t *screen_machine_name;
|
lv_obj_t *screen_machine_name_rt;
|
||||||
lv_obj_t *screen_sys_name;
|
lv_obj_t *screen_sys_name;
|
||||||
lv_obj_t *screen_machine_id;
|
lv_obj_t *screen_machine_id_rt;
|
||||||
lv_obj_t *screen_sys_id;
|
lv_obj_t *screen_sys_id;
|
||||||
lv_obj_t *screen_sys_var;
|
lv_obj_t *screen_sys_var;
|
||||||
lv_obj_t *screen_sys_save;
|
lv_obj_t *screen_sys_save;
|
||||||
|
|||||||
@@ -5062,7 +5062,7 @@ void setup_scr_screen(lv_ui *ui)
|
|||||||
|
|
||||||
//Write codes screen_w_5
|
//Write codes screen_w_5
|
||||||
ui->screen_w_5 = lv_obj_create(ui->screen_tabview_tab_5);
|
ui->screen_w_5 = lv_obj_create(ui->screen_tabview_tab_5);
|
||||||
lv_obj_set_pos(ui->screen_w_5, 0, 0);
|
lv_obj_set_pos(ui->screen_w_5, 0, -1);
|
||||||
lv_obj_set_size(ui->screen_w_5, 800, 450);
|
lv_obj_set_size(ui->screen_w_5, 800, 450);
|
||||||
lv_obj_set_scrollbar_mode(ui->screen_w_5, LV_SCROLLBAR_MODE_OFF);
|
lv_obj_set_scrollbar_mode(ui->screen_w_5, LV_SCROLLBAR_MODE_OFF);
|
||||||
|
|
||||||
@@ -5076,45 +5076,45 @@ void setup_scr_screen(lv_ui *ui)
|
|||||||
lv_obj_set_style_pad_right(ui->screen_w_5, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
lv_obj_set_style_pad_right(ui->screen_w_5, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
lv_obj_set_style_shadow_width(ui->screen_w_5, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
lv_obj_set_style_shadow_width(ui->screen_w_5, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
|
|
||||||
//Write codes screen_machine_name
|
//Write codes screen_machine_name_rt
|
||||||
ui->screen_machine_name = lv_textarea_create(ui->screen_w_5);
|
ui->screen_machine_name_rt = lv_textarea_create(ui->screen_w_5);
|
||||||
lv_textarea_set_text(ui->screen_machine_name, "828");
|
lv_textarea_set_text(ui->screen_machine_name_rt, "828");
|
||||||
lv_textarea_set_placeholder_text(ui->screen_machine_name, "");
|
lv_textarea_set_placeholder_text(ui->screen_machine_name_rt, "");
|
||||||
lv_textarea_set_password_bullet(ui->screen_machine_name, "*");
|
lv_textarea_set_password_bullet(ui->screen_machine_name_rt, "*");
|
||||||
lv_textarea_set_password_mode(ui->screen_machine_name, false);
|
lv_textarea_set_password_mode(ui->screen_machine_name_rt, false);
|
||||||
lv_textarea_set_one_line(ui->screen_machine_name, true);
|
lv_textarea_set_one_line(ui->screen_machine_name_rt, true);
|
||||||
lv_textarea_set_accepted_chars(ui->screen_machine_name, "");
|
lv_textarea_set_accepted_chars(ui->screen_machine_name_rt, "");
|
||||||
lv_textarea_set_max_length(ui->screen_machine_name, 32);
|
lv_textarea_set_max_length(ui->screen_machine_name_rt, 32);
|
||||||
#if LV_USE_KEYBOARD != 0 || LV_USE_ZH_KEYBOARD != 0
|
#if LV_USE_KEYBOARD != 0 || LV_USE_ZH_KEYBOARD != 0
|
||||||
lv_obj_add_event_cb(ui->screen_machine_name, ta_event_cb, LV_EVENT_ALL, ui->g_kb_top_layer);
|
lv_obj_add_event_cb(ui->screen_machine_name_rt, ta_event_cb, LV_EVENT_ALL, ui->g_kb_top_layer);
|
||||||
#endif
|
#endif
|
||||||
lv_obj_set_pos(ui->screen_machine_name, 150, 70);
|
lv_obj_set_pos(ui->screen_machine_name_rt, 150, 70);
|
||||||
lv_obj_set_size(ui->screen_machine_name, 200, 50);
|
lv_obj_set_size(ui->screen_machine_name_rt, 200, 50);
|
||||||
|
|
||||||
//Write style for screen_machine_name, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
//Write style for screen_machine_name_rt, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||||
lv_obj_set_style_text_color(ui->screen_machine_name, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT);
|
lv_obj_set_style_text_color(ui->screen_machine_name_rt, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
lv_obj_set_style_text_font(ui->screen_machine_name, &lv_font_montserratMedium_30, LV_PART_MAIN|LV_STATE_DEFAULT);
|
lv_obj_set_style_text_font(ui->screen_machine_name_rt, &lv_font_montserratMedium_30, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
lv_obj_set_style_text_opa(ui->screen_machine_name, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
lv_obj_set_style_text_opa(ui->screen_machine_name_rt, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
lv_obj_set_style_text_letter_space(ui->screen_machine_name, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
lv_obj_set_style_text_letter_space(ui->screen_machine_name_rt, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
lv_obj_set_style_text_align(ui->screen_machine_name, LV_TEXT_ALIGN_LEFT, LV_PART_MAIN|LV_STATE_DEFAULT);
|
lv_obj_set_style_text_align(ui->screen_machine_name_rt, LV_TEXT_ALIGN_LEFT, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
lv_obj_set_style_bg_opa(ui->screen_machine_name, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
lv_obj_set_style_bg_opa(ui->screen_machine_name_rt, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
lv_obj_set_style_bg_color(ui->screen_machine_name, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
|
lv_obj_set_style_bg_color(ui->screen_machine_name_rt, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
lv_obj_set_style_bg_grad_dir(ui->screen_machine_name, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
|
lv_obj_set_style_bg_grad_dir(ui->screen_machine_name_rt, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
lv_obj_set_style_border_width(ui->screen_machine_name, 2, LV_PART_MAIN|LV_STATE_DEFAULT);
|
lv_obj_set_style_border_width(ui->screen_machine_name_rt, 2, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
lv_obj_set_style_border_opa(ui->screen_machine_name, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
lv_obj_set_style_border_opa(ui->screen_machine_name_rt, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
lv_obj_set_style_border_color(ui->screen_machine_name, lv_color_hex(0xe6e6e6), LV_PART_MAIN|LV_STATE_DEFAULT);
|
lv_obj_set_style_border_color(ui->screen_machine_name_rt, lv_color_hex(0xe6e6e6), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
lv_obj_set_style_border_side(ui->screen_machine_name, LV_BORDER_SIDE_FULL, LV_PART_MAIN|LV_STATE_DEFAULT);
|
lv_obj_set_style_border_side(ui->screen_machine_name_rt, LV_BORDER_SIDE_FULL, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
lv_obj_set_style_shadow_width(ui->screen_machine_name, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
lv_obj_set_style_shadow_width(ui->screen_machine_name_rt, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
lv_obj_set_style_pad_top(ui->screen_machine_name, 4, LV_PART_MAIN|LV_STATE_DEFAULT);
|
lv_obj_set_style_pad_top(ui->screen_machine_name_rt, 4, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
lv_obj_set_style_pad_right(ui->screen_machine_name, 4, LV_PART_MAIN|LV_STATE_DEFAULT);
|
lv_obj_set_style_pad_right(ui->screen_machine_name_rt, 4, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
lv_obj_set_style_pad_left(ui->screen_machine_name, 4, LV_PART_MAIN|LV_STATE_DEFAULT);
|
lv_obj_set_style_pad_left(ui->screen_machine_name_rt, 4, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
lv_obj_set_style_radius(ui->screen_machine_name, 4, LV_PART_MAIN|LV_STATE_DEFAULT);
|
lv_obj_set_style_radius(ui->screen_machine_name_rt, 4, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
|
|
||||||
//Write style for screen_machine_name, Part: LV_PART_SCROLLBAR, State: LV_STATE_DEFAULT.
|
//Write style for screen_machine_name_rt, Part: LV_PART_SCROLLBAR, State: LV_STATE_DEFAULT.
|
||||||
lv_obj_set_style_bg_opa(ui->screen_machine_name, 255, LV_PART_SCROLLBAR|LV_STATE_DEFAULT);
|
lv_obj_set_style_bg_opa(ui->screen_machine_name_rt, 255, LV_PART_SCROLLBAR|LV_STATE_DEFAULT);
|
||||||
lv_obj_set_style_bg_color(ui->screen_machine_name, lv_color_hex(0x2195f6), LV_PART_SCROLLBAR|LV_STATE_DEFAULT);
|
lv_obj_set_style_bg_color(ui->screen_machine_name_rt, lv_color_hex(0x2195f6), LV_PART_SCROLLBAR|LV_STATE_DEFAULT);
|
||||||
lv_obj_set_style_bg_grad_dir(ui->screen_machine_name, LV_GRAD_DIR_NONE, LV_PART_SCROLLBAR|LV_STATE_DEFAULT);
|
lv_obj_set_style_bg_grad_dir(ui->screen_machine_name_rt, LV_GRAD_DIR_NONE, LV_PART_SCROLLBAR|LV_STATE_DEFAULT);
|
||||||
lv_obj_set_style_radius(ui->screen_machine_name, 0, LV_PART_SCROLLBAR|LV_STATE_DEFAULT);
|
lv_obj_set_style_radius(ui->screen_machine_name_rt, 0, LV_PART_SCROLLBAR|LV_STATE_DEFAULT);
|
||||||
|
|
||||||
//Write codes screen_sys_name
|
//Write codes screen_sys_name
|
||||||
ui->screen_sys_name = lv_label_create(ui->screen_w_5);
|
ui->screen_sys_name = lv_label_create(ui->screen_w_5);
|
||||||
@@ -5139,45 +5139,45 @@ void setup_scr_screen(lv_ui *ui)
|
|||||||
lv_obj_set_style_pad_left(ui->screen_sys_name, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
lv_obj_set_style_pad_left(ui->screen_sys_name, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
lv_obj_set_style_shadow_width(ui->screen_sys_name, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
lv_obj_set_style_shadow_width(ui->screen_sys_name, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
|
|
||||||
//Write codes screen_machine_id
|
//Write codes screen_machine_id_rt
|
||||||
ui->screen_machine_id = lv_textarea_create(ui->screen_w_5);
|
ui->screen_machine_id_rt = lv_textarea_create(ui->screen_w_5);
|
||||||
lv_textarea_set_text(ui->screen_machine_id, "ID");
|
lv_textarea_set_text(ui->screen_machine_id_rt, "ID");
|
||||||
lv_textarea_set_placeholder_text(ui->screen_machine_id, "");
|
lv_textarea_set_placeholder_text(ui->screen_machine_id_rt, "");
|
||||||
lv_textarea_set_password_bullet(ui->screen_machine_id, "*");
|
lv_textarea_set_password_bullet(ui->screen_machine_id_rt, "*");
|
||||||
lv_textarea_set_password_mode(ui->screen_machine_id, false);
|
lv_textarea_set_password_mode(ui->screen_machine_id_rt, false);
|
||||||
lv_textarea_set_one_line(ui->screen_machine_id, true);
|
lv_textarea_set_one_line(ui->screen_machine_id_rt, true);
|
||||||
lv_textarea_set_accepted_chars(ui->screen_machine_id, "");
|
lv_textarea_set_accepted_chars(ui->screen_machine_id_rt, "0123456789");
|
||||||
lv_textarea_set_max_length(ui->screen_machine_id, 32);
|
lv_textarea_set_max_length(ui->screen_machine_id_rt, 2);
|
||||||
#if LV_USE_KEYBOARD != 0 || LV_USE_ZH_KEYBOARD != 0
|
#if LV_USE_KEYBOARD != 0 || LV_USE_ZH_KEYBOARD != 0
|
||||||
lv_obj_add_event_cb(ui->screen_machine_id, ta_event_cb, LV_EVENT_ALL, ui->g_kb_top_layer);
|
lv_obj_add_event_cb(ui->screen_machine_id_rt, ta_event_cb, LV_EVENT_ALL, ui->g_kb_top_layer);
|
||||||
#endif
|
#endif
|
||||||
lv_obj_set_pos(ui->screen_machine_id, 150, 10);
|
lv_obj_set_pos(ui->screen_machine_id_rt, 150, 10);
|
||||||
lv_obj_set_size(ui->screen_machine_id, 200, 50);
|
lv_obj_set_size(ui->screen_machine_id_rt, 200, 50);
|
||||||
|
|
||||||
//Write style for screen_machine_id, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
//Write style for screen_machine_id_rt, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||||
lv_obj_set_style_text_color(ui->screen_machine_id, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT);
|
lv_obj_set_style_text_color(ui->screen_machine_id_rt, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
lv_obj_set_style_text_font(ui->screen_machine_id, &lv_font_montserratMedium_30, LV_PART_MAIN|LV_STATE_DEFAULT);
|
lv_obj_set_style_text_font(ui->screen_machine_id_rt, &lv_font_montserratMedium_30, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
lv_obj_set_style_text_opa(ui->screen_machine_id, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
lv_obj_set_style_text_opa(ui->screen_machine_id_rt, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
lv_obj_set_style_text_letter_space(ui->screen_machine_id, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
lv_obj_set_style_text_letter_space(ui->screen_machine_id_rt, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
lv_obj_set_style_text_align(ui->screen_machine_id, LV_TEXT_ALIGN_LEFT, LV_PART_MAIN|LV_STATE_DEFAULT);
|
lv_obj_set_style_text_align(ui->screen_machine_id_rt, LV_TEXT_ALIGN_LEFT, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
lv_obj_set_style_bg_opa(ui->screen_machine_id, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
lv_obj_set_style_bg_opa(ui->screen_machine_id_rt, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
lv_obj_set_style_bg_color(ui->screen_machine_id, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
|
lv_obj_set_style_bg_color(ui->screen_machine_id_rt, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
lv_obj_set_style_bg_grad_dir(ui->screen_machine_id, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
|
lv_obj_set_style_bg_grad_dir(ui->screen_machine_id_rt, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
lv_obj_set_style_border_width(ui->screen_machine_id, 2, LV_PART_MAIN|LV_STATE_DEFAULT);
|
lv_obj_set_style_border_width(ui->screen_machine_id_rt, 2, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
lv_obj_set_style_border_opa(ui->screen_machine_id, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
lv_obj_set_style_border_opa(ui->screen_machine_id_rt, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
lv_obj_set_style_border_color(ui->screen_machine_id, lv_color_hex(0xe6e6e6), LV_PART_MAIN|LV_STATE_DEFAULT);
|
lv_obj_set_style_border_color(ui->screen_machine_id_rt, lv_color_hex(0xe6e6e6), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
lv_obj_set_style_border_side(ui->screen_machine_id, LV_BORDER_SIDE_FULL, LV_PART_MAIN|LV_STATE_DEFAULT);
|
lv_obj_set_style_border_side(ui->screen_machine_id_rt, LV_BORDER_SIDE_FULL, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
lv_obj_set_style_shadow_width(ui->screen_machine_id, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
lv_obj_set_style_shadow_width(ui->screen_machine_id_rt, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
lv_obj_set_style_pad_top(ui->screen_machine_id, 4, LV_PART_MAIN|LV_STATE_DEFAULT);
|
lv_obj_set_style_pad_top(ui->screen_machine_id_rt, 4, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
lv_obj_set_style_pad_right(ui->screen_machine_id, 4, LV_PART_MAIN|LV_STATE_DEFAULT);
|
lv_obj_set_style_pad_right(ui->screen_machine_id_rt, 4, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
lv_obj_set_style_pad_left(ui->screen_machine_id, 4, LV_PART_MAIN|LV_STATE_DEFAULT);
|
lv_obj_set_style_pad_left(ui->screen_machine_id_rt, 4, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
lv_obj_set_style_radius(ui->screen_machine_id, 4, LV_PART_MAIN|LV_STATE_DEFAULT);
|
lv_obj_set_style_radius(ui->screen_machine_id_rt, 4, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
|
|
||||||
//Write style for screen_machine_id, Part: LV_PART_SCROLLBAR, State: LV_STATE_DEFAULT.
|
//Write style for screen_machine_id_rt, Part: LV_PART_SCROLLBAR, State: LV_STATE_DEFAULT.
|
||||||
lv_obj_set_style_bg_opa(ui->screen_machine_id, 255, LV_PART_SCROLLBAR|LV_STATE_DEFAULT);
|
lv_obj_set_style_bg_opa(ui->screen_machine_id_rt, 255, LV_PART_SCROLLBAR|LV_STATE_DEFAULT);
|
||||||
lv_obj_set_style_bg_color(ui->screen_machine_id, lv_color_hex(0x2195f6), LV_PART_SCROLLBAR|LV_STATE_DEFAULT);
|
lv_obj_set_style_bg_color(ui->screen_machine_id_rt, lv_color_hex(0x2195f6), LV_PART_SCROLLBAR|LV_STATE_DEFAULT);
|
||||||
lv_obj_set_style_bg_grad_dir(ui->screen_machine_id, LV_GRAD_DIR_NONE, LV_PART_SCROLLBAR|LV_STATE_DEFAULT);
|
lv_obj_set_style_bg_grad_dir(ui->screen_machine_id_rt, LV_GRAD_DIR_NONE, LV_PART_SCROLLBAR|LV_STATE_DEFAULT);
|
||||||
lv_obj_set_style_radius(ui->screen_machine_id, 0, LV_PART_SCROLLBAR|LV_STATE_DEFAULT);
|
lv_obj_set_style_radius(ui->screen_machine_id_rt, 0, LV_PART_SCROLLBAR|LV_STATE_DEFAULT);
|
||||||
|
|
||||||
//Write codes screen_sys_id
|
//Write codes screen_sys_id
|
||||||
ui->screen_sys_id = lv_label_create(ui->screen_w_5);
|
ui->screen_sys_id = lv_label_create(ui->screen_w_5);
|
||||||
@@ -5217,7 +5217,7 @@ void setup_scr_screen(lv_ui *ui)
|
|||||||
lv_obj_align(ui->screen_sys_save_label, LV_ALIGN_CENTER, 0, 0);
|
lv_obj_align(ui->screen_sys_save_label, LV_ALIGN_CENTER, 0, 0);
|
||||||
lv_obj_set_style_pad_all(ui->screen_sys_save, 0, LV_STATE_DEFAULT);
|
lv_obj_set_style_pad_all(ui->screen_sys_save, 0, LV_STATE_DEFAULT);
|
||||||
lv_obj_set_width(ui->screen_sys_save_label, LV_PCT(100));
|
lv_obj_set_width(ui->screen_sys_save_label, LV_PCT(100));
|
||||||
lv_obj_set_pos(ui->screen_sys_save, 880, 400);
|
lv_obj_set_pos(ui->screen_sys_save, 880, 398);
|
||||||
lv_obj_set_size(ui->screen_sys_save, 100, 50);
|
lv_obj_set_size(ui->screen_sys_save, 100, 50);
|
||||||
|
|
||||||
//Write style for screen_sys_save, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
//Write style for screen_sys_save, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||||
|
|||||||
@@ -301,8 +301,8 @@ void setup_user_screen(lv_ui *ui)
|
|||||||
{
|
{
|
||||||
lv_obj_clear_flag(lv_tabview_get_content(ui->screen_tabview), LV_OBJ_FLAG_SCROLLABLE);//禁止左右滑动
|
lv_obj_clear_flag(lv_tabview_get_content(ui->screen_tabview), LV_OBJ_FLAG_SCROLLABLE);//禁止左右滑动
|
||||||
lv_obj_clear_flag(lv_tabview_get_content(ui->screen_w_io), LV_OBJ_FLAG_SCROLLABLE);//禁止左右滑动
|
lv_obj_clear_flag(lv_tabview_get_content(ui->screen_w_io), LV_OBJ_FLAG_SCROLLABLE);//禁止左右滑动
|
||||||
lv_textarea_set_text(ui->screen_machine_id, machine_ID);//设备id
|
lv_textarea_set_text(ui->screen_machine_id_rt, machine_ID);//设备id
|
||||||
lv_textarea_set_text(ui->screen_machine_name, machine_name);//设备名
|
lv_textarea_set_text(ui->screen_machine_name_rt, machine_name);//设备名
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user