minor updates during tests
This commit is contained in:
@@ -198,7 +198,7 @@ static void my_win_close(lv_app_inst_t * app)
|
||||
static lv_action_res_t ta_rel_action(lv_obj_t * ta, lv_dispi_t * dispi)
|
||||
{
|
||||
lv_ta_set_text(ta, ""); /*Clear the ta*/
|
||||
lv_app_kb_open(ta, LV_APP_KB_MODE_TXT, NULL, kb_ok_action);
|
||||
lv_app_kb_open(ta, LV_APP_KB_MODE_TXT | LV_APP_KB_MODE_WIN_RESIZE, NULL, kb_ok_action);
|
||||
return LV_ACTION_RES_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -113,6 +113,7 @@ static lv_app_dsc_t my_app_dsc =
|
||||
};
|
||||
|
||||
static lv_style_t style_sc_label;
|
||||
static lv_style_t style_btn_symbol;
|
||||
|
||||
|
||||
/**********************
|
||||
@@ -133,6 +134,8 @@ const lv_app_dsc_t * lv_app_files_init(void)
|
||||
memcpy(&style_sc_label, &app_style->sc_rec_rel, sizeof(lv_style_t));
|
||||
style_sc_label.font = font_get(LV_APP_FONT_LARGE);
|
||||
|
||||
lv_style_get(LV_STYLE_BTN_REL, &style_btn_symbol);
|
||||
style_btn_symbol.font = font_get(LV_IMG_DEF_SYMBOL_FONT);
|
||||
return &my_app_dsc;
|
||||
}
|
||||
|
||||
@@ -350,7 +353,8 @@ static void win_create_list(lv_app_inst_t * app)
|
||||
/*Create a new list*/
|
||||
win_data->file_list = lv_list_create(app->win, NULL);
|
||||
lv_obj_set_width(win_data->file_list, lv_win_get_width(app->win));
|
||||
//TODO lv_obj_set_style(win_data->file_list, lv_lists_get(LV_LISTS_TRANSP, NULL));
|
||||
lv_list_set_style_img(win_data->file_list, &style_btn_symbol);
|
||||
lv_obj_set_style(lv_page_get_scrl(win_data->file_list), lv_style_get(LV_STYLE_TRANSP_TIGHT, NULL));
|
||||
lv_obj_set_drag_parent(win_data->file_list, true);
|
||||
lv_obj_set_drag_parent(lv_page_get_scrl(win_data->file_list), true);
|
||||
lv_cont_set_fit(win_data->file_list, false, true);
|
||||
@@ -381,13 +385,13 @@ static void win_load_file_list(lv_app_inst_t * app)
|
||||
for(i = 0; drv[i] != '\0'; i++) {
|
||||
buf[0] = drv[i];
|
||||
buf[1] = '\0';
|
||||
liste = lv_list_add(win_data->file_list, "U:/icon_driver", buf, win_drv_action);
|
||||
liste = lv_list_add(win_data->file_list, SYMBOL_DRIVE, buf, win_drv_action);
|
||||
lv_obj_set_free_p(liste, app);
|
||||
}
|
||||
}
|
||||
/*List the files/folders with fs interface*/
|
||||
else {
|
||||
liste = lv_list_add(win_data->file_list, "U:/icon_up", "Up", win_up_action);
|
||||
liste = lv_list_add(win_data->file_list, SYMBOL_UP, "Up", win_up_action);
|
||||
lv_obj_set_free_p(liste, app);
|
||||
|
||||
fs_readdir_t rd;
|
||||
@@ -399,7 +403,7 @@ static void win_load_file_list(lv_app_inst_t * app)
|
||||
|
||||
/*At not first page add prev. page button */
|
||||
if(app_data->file_cnt != 0) {
|
||||
liste = lv_list_add(win_data->file_list, "U:/icon_left", "Previous page", win_prev_action);
|
||||
liste = lv_list_add(win_data->file_list, SYMBOL_LEFT, "Previous page", win_prev_action);
|
||||
lv_obj_set_free_p(liste, app);
|
||||
}
|
||||
|
||||
@@ -409,7 +413,7 @@ static void win_load_file_list(lv_app_inst_t * app)
|
||||
uint16_t file_cnt = 0;
|
||||
while(file_cnt <= app_data->file_cnt) {
|
||||
res = fs_readdir(&rd, fn);
|
||||
if(res != FS_RES_OK || fn[0] == '\0'){
|
||||
if(res != FS_RES_OK ){
|
||||
lv_app_notice_add("Can not read\nthe path in Files");
|
||||
return;
|
||||
}
|
||||
@@ -420,13 +424,13 @@ static void win_load_file_list(lv_app_inst_t * app)
|
||||
while(res == FS_RES_OK && fn[0] != '\0') {
|
||||
if(fn[0] == '/') { /*Add a folder*/
|
||||
lv_obj_t * liste;
|
||||
liste = lv_list_add(win_data->file_list, "U:/icon_folder", &fn[1], win_folder_action);
|
||||
liste = lv_list_add(win_data->file_list, SYMBOL_FOLDER, &fn[1], win_folder_action);
|
||||
lv_obj_set_free_p(liste, app);
|
||||
app_data->file_cnt ++;
|
||||
}
|
||||
/*Add a file*/
|
||||
else {
|
||||
liste = lv_list_add(win_data->file_list, "U:/icon_file", fn, win_file_action);
|
||||
liste = lv_list_add(win_data->file_list, SYMBOL_FILE, fn, win_file_action);
|
||||
lv_obj_set_free_p(liste, app);
|
||||
app_data->file_cnt ++;
|
||||
}
|
||||
@@ -436,7 +440,7 @@ static void win_load_file_list(lv_app_inst_t * app)
|
||||
|
||||
/*Show only LV_APP_FSEL_MAX_FILE elements and add a Next page button*/
|
||||
if(app_data->file_cnt != 0 && app_data->file_cnt % LV_APP_FILES_PAGE_SIZE == 0) {
|
||||
liste = lv_list_add(win_data->file_list, "U:/icon_right", "Next page", win_next_action);
|
||||
liste = lv_list_add(win_data->file_list, SYMBOL_RIGHT, "Next page", win_next_action);
|
||||
lv_obj_set_free_p(liste, app);
|
||||
break;
|
||||
}
|
||||
@@ -525,7 +529,7 @@ static lv_action_res_t win_drv_action(lv_obj_t * drv, lv_dispi_t * dispi)
|
||||
{
|
||||
lv_app_inst_t * app = lv_obj_get_free_p(drv);
|
||||
my_app_data_t * app_data = app->app_data;
|
||||
sprintf(app_data->path, "%s:", lv_list_element_get_txt(drv));
|
||||
sprintf(app_data->path, "%s:", lv_list_get_element_text(drv));
|
||||
app_data->file_cnt = 0;
|
||||
lv_win_set_title(app->win, app_data->path);
|
||||
my_sc_data_t * sc_data = app->sc_data;
|
||||
@@ -549,7 +553,7 @@ static lv_action_res_t win_folder_action(lv_obj_t * folder, lv_dispi_t * dispi)
|
||||
{
|
||||
lv_app_inst_t * app = lv_obj_get_free_p(folder);
|
||||
my_app_data_t * app_data = app->app_data;
|
||||
sprintf(app_data->path, "%s/%s", app_data->path, lv_list_element_get_txt(folder));
|
||||
sprintf(app_data->path, "%s/%s", app_data->path, lv_list_get_element_text(folder));
|
||||
app_data->file_cnt = 0;
|
||||
|
||||
lv_win_set_title(app->win, app_data->path);
|
||||
@@ -577,7 +581,7 @@ static lv_action_res_t win_file_action(lv_obj_t * file, lv_dispi_t * dispi)
|
||||
my_app_data_t * app_data = app->app_data;
|
||||
my_win_data_t * win_data = app->win_data;
|
||||
|
||||
sprintf(app_data->fn, "%s", lv_list_element_get_txt(file));
|
||||
sprintf(app_data->fn, "%s", lv_list_get_element_text(file));
|
||||
|
||||
win_create_list(app);
|
||||
|
||||
@@ -662,9 +666,9 @@ static lv_action_res_t win_send_settings_element_rel_action(lv_obj_t * element,
|
||||
lv_app_notice_add("CRC sending is\nnot supported yet");
|
||||
}
|
||||
} else if(id == SEND_SETTINGS_CHUNK_SIZE) {
|
||||
lv_app_kb_open(element, LV_APP_KB_MODE_NUM, send_settings_kb_close_action, send_settings_kb_ok_action);
|
||||
lv_app_kb_open(element, LV_APP_KB_MODE_NUM | LV_APP_KB_MODE_WIN_RESIZE, send_settings_kb_close_action, send_settings_kb_ok_action);
|
||||
} else if(id == SEND_SETTINGS_CHUNK_DELAY) {
|
||||
lv_app_kb_open(element, LV_APP_KB_MODE_NUM, send_settings_kb_close_action, send_settings_kb_ok_action);
|
||||
lv_app_kb_open(element, LV_APP_KB_MODE_NUM | LV_APP_KB_MODE_WIN_RESIZE, send_settings_kb_close_action, send_settings_kb_ok_action);
|
||||
}
|
||||
|
||||
return LV_ACTION_RES_OK;
|
||||
|
||||
143
lv_appx/lv_app_phantom.c
Normal file
143
lv_appx/lv_app_phantom.c
Normal file
@@ -0,0 +1,143 @@
|
||||
/**
|
||||
* @file lv_app_example.c
|
||||
*
|
||||
*/
|
||||
|
||||
/*********************
|
||||
* INCLUDES
|
||||
*********************/
|
||||
#include "lv_app_phantom.h"
|
||||
#if LV_APP_ENABLE != 0 && USE_LV_APP_PHANTOM != 0
|
||||
|
||||
#include "../lv_app/lv_app_util/lv_app_kb.h"
|
||||
#include <stdio.h>
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
||||
*********************/
|
||||
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
**********************/
|
||||
|
||||
/*Application specific data for an instance of this application*/
|
||||
typedef struct
|
||||
{
|
||||
void (*com_listen)(lv_app_inst_t * app_send, lv_app_inst_t * app_rec,
|
||||
lv_app_com_type_t type , const void * data, uint32_t size);
|
||||
}my_app_data_t;
|
||||
|
||||
/*Application specific data a window of this application*/
|
||||
typedef struct
|
||||
{
|
||||
|
||||
}my_win_data_t;
|
||||
|
||||
/*Application specific data for a shortcut of this application*/
|
||||
typedef struct
|
||||
{
|
||||
lv_obj_t * label;
|
||||
}my_sc_data_t;
|
||||
|
||||
/**********************
|
||||
* STATIC PROTOTYPES
|
||||
**********************/
|
||||
static void my_app_run(lv_app_inst_t * app, void * conf);
|
||||
static void my_app_close(lv_app_inst_t * app);
|
||||
static void my_com_rec(lv_app_inst_t * app_send, lv_app_inst_t * app_rec,
|
||||
lv_app_com_type_t type , const void * data, uint32_t size);
|
||||
|
||||
/**********************
|
||||
* STATIC VARIABLES
|
||||
**********************/
|
||||
static lv_app_dsc_t my_app_dsc =
|
||||
{
|
||||
.name = "Phantom",
|
||||
.mode = LV_APP_MODE_NONE,
|
||||
.app_run = my_app_run,
|
||||
.app_close = my_app_close,
|
||||
.com_rec = my_com_rec,
|
||||
.win_open = NULL,
|
||||
.win_close = NULL,
|
||||
.sc_open = NULL,
|
||||
.sc_close = NULL,
|
||||
.app_data_size = sizeof(my_app_data_t),
|
||||
.sc_data_size = sizeof(my_sc_data_t),
|
||||
.win_data_size = sizeof(my_win_data_t),
|
||||
};
|
||||
|
||||
/**********************
|
||||
* MACROS
|
||||
**********************/
|
||||
|
||||
/**********************
|
||||
* GLOBAL FUNCTIONS
|
||||
**********************/
|
||||
|
||||
/**
|
||||
* Initialize the application
|
||||
* @return pointer to the application descriptor of this application
|
||||
*/
|
||||
const lv_app_dsc_t * lv_app_phantom_init(void)
|
||||
{
|
||||
|
||||
return &my_app_dsc;
|
||||
}
|
||||
|
||||
/**********************
|
||||
* STATIC FUNCTIONS
|
||||
**********************/
|
||||
|
||||
/**
|
||||
* Run an application according to 'app_dsc'
|
||||
* @param app_dsc pointer to an application descriptor
|
||||
* @param conf pointer to a lv_app_phantom_conf_t structure with configuration data or NULL if unused
|
||||
* @return pointer to the opened application or NULL if any error occurred
|
||||
*/
|
||||
static void my_app_run(lv_app_inst_t * app, void * conf)
|
||||
{
|
||||
/*Initialize the application*/
|
||||
my_app_data_t * app_data = app->app_data;
|
||||
app_data->com_listen = NULL;
|
||||
|
||||
if(conf != NULL) {
|
||||
lv_app_phantom_conf_t * my_conf = conf;
|
||||
app_data->com_listen = my_conf->com_listen;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Close a running application.
|
||||
* Close the Window and the Shortcut too if opened.
|
||||
* Free all the allocated memory by this application.
|
||||
* @param app pointer to an application
|
||||
*/
|
||||
static void my_app_close(lv_app_inst_t * app)
|
||||
{
|
||||
/*No dynamically allocated data in 'my_app_data'*/
|
||||
}
|
||||
|
||||
/**
|
||||
* Read the data have been sent to this application
|
||||
* @param app_send pointer to an application which sent the message
|
||||
* @param app_rec pointer to an application which is receiving the message
|
||||
* @param type type of data from 'lv_app_com_type_t' enum
|
||||
* @param data pointer to the sent data
|
||||
* @param size length of 'data' in bytes
|
||||
*/
|
||||
static void my_com_rec(lv_app_inst_t * app_send, lv_app_inst_t * app_rec,
|
||||
lv_app_com_type_t type , const void * data, uint32_t size)
|
||||
{
|
||||
|
||||
my_app_data_t * app_data = app_rec->app_data;
|
||||
|
||||
if(app_data->com_listen != NULL) {
|
||||
app_data->com_listen(app_send, app_rec, type, data, size);
|
||||
}
|
||||
}
|
||||
|
||||
/*--------------------
|
||||
* OTHER FUNCTIONS
|
||||
---------------------*/
|
||||
|
||||
#endif /*LV_APP_ENABLE != 0 && USE_LV_APP_EXAMPLE != 0*/
|
||||
42
lv_appx/lv_app_phantom.h
Normal file
42
lv_appx/lv_app_phantom.h
Normal file
@@ -0,0 +1,42 @@
|
||||
/**
|
||||
* @file lv_app_phantom.h
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef LV_APP_PHANTOM_H
|
||||
#define LV_APP_PHANTOM_H
|
||||
|
||||
/*********************
|
||||
* INCLUDES
|
||||
*********************/
|
||||
#include "lvgl/lv_app/lv_app.h"
|
||||
|
||||
#if LV_APP_ENABLE != 0 && USE_LV_APP_PHANTOM != 0
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
||||
*********************/
|
||||
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
**********************/
|
||||
typedef struct
|
||||
{
|
||||
void (*com_listen)(lv_app_inst_t * app_send,
|
||||
lv_app_inst_t * app_rec,
|
||||
lv_app_com_type_t type ,
|
||||
const void * data, uint32_t size);
|
||||
}lv_app_phantom_conf_t;
|
||||
|
||||
/**********************
|
||||
* GLOBAL PROTOTYPES
|
||||
**********************/
|
||||
const lv_app_dsc_t * lv_app_phantom_init(void);
|
||||
|
||||
/**********************
|
||||
* MACROS
|
||||
**********************/
|
||||
|
||||
#endif /*LV_APP_ENABLE != 0 && USE_LV_APP_PHANTOM != 0*/
|
||||
|
||||
#endif /* LV_APP_PHANTOM_H */
|
||||
@@ -83,8 +83,10 @@ static lv_app_dsc_t my_app_dsc =
|
||||
|
||||
static uint8_t mem_pct[LV_APP_SYSMON_PNUM];
|
||||
static uint8_t cpu_pct[LV_APP_SYSMON_PNUM];
|
||||
static lv_style_t cpu_bars;
|
||||
static lv_style_t mem_bars;
|
||||
static lv_style_t cpu_bar_bg;
|
||||
static lv_style_t mem_bar_bg;
|
||||
static lv_style_t cpu_bar_indic;
|
||||
static lv_style_t mem_bar_indic;
|
||||
#if USE_DYN_MEM != 0 && DM_CUSTOM == 0
|
||||
static dm_mon_t mem_mon;
|
||||
#endif
|
||||
@@ -109,23 +111,30 @@ const lv_app_dsc_t * lv_app_sysmon_init(void)
|
||||
memset(cpu_pct, 0, sizeof(cpu_pct));
|
||||
|
||||
/*Create bar styles for the shortcut*/
|
||||
lv_style_get(LV_STYLE_PRETTY_COLOR, &cpu_bars);
|
||||
lv_style_get(LV_STYLE_PRETTY, &cpu_bar_bg);
|
||||
cpu_bar_bg.ccolor = COLOR_MAKE(0x40, 0x00, 0x00);
|
||||
cpu_bar_bg.font = font_get(LV_APP_FONT_MEDIUM);
|
||||
cpu_bar_bg.line_space = 0;
|
||||
cpu_bar_bg.txt_align = 1;
|
||||
cpu_bar_bg.hpad = 0;
|
||||
cpu_bar_bg.vpad = 0;
|
||||
|
||||
cpu_bars.gcolor = COLOR_MARRON;
|
||||
cpu_bars.mcolor = COLOR_RED;
|
||||
cpu_bars.bwidth = 0;
|
||||
memcpy(&mem_bar_bg, &cpu_bar_bg, sizeof(lv_style_t));
|
||||
mem_bar_bg.ccolor = COLOR_MAKE(0x00, 0x40, 0x00);
|
||||
|
||||
cpu_bars.ccolor = COLOR_MAKE(0x40, 0x00, 0x00);
|
||||
cpu_bars.font = font_get(LV_APP_FONT_MEDIUM);
|
||||
cpu_bars.line_space = 0;
|
||||
cpu_bars.txt_align = 1;
|
||||
cpu_bars.hpad = 0;
|
||||
cpu_bars.vpad = 0;
|
||||
lv_style_get(LV_STYLE_PRETTY_COLOR, &cpu_bar_indic);
|
||||
cpu_bar_indic.gcolor = COLOR_MARRON;
|
||||
cpu_bar_indic.mcolor = COLOR_RED;
|
||||
cpu_bar_indic.bcolor = COLOR_BLACK;
|
||||
//cpu_bar_indic.bwidth = 1 * LV_DOWNSCALE;
|
||||
cpu_bar_indic.bopa = OPA_50;
|
||||
cpu_bar_indic.hpad = 0 * LV_DOWNSCALE;
|
||||
cpu_bar_indic.vpad = 0 * LV_DOWNSCALE;
|
||||
|
||||
memcpy(&mem_bars, &cpu_bars, sizeof(cpu_bars));
|
||||
mem_bars.gcolor = COLOR_GREEN;
|
||||
mem_bars.mcolor = COLOR_LIME;
|
||||
mem_bars.ccolor = COLOR_MAKE(0x00, 0x40, 0x00);
|
||||
|
||||
memcpy(&mem_bar_indic, &cpu_bar_indic, sizeof(lv_style_t));
|
||||
mem_bar_indic.gcolor = COLOR_GREEN;
|
||||
mem_bar_indic.mcolor = COLOR_LIME;
|
||||
|
||||
return &my_app_dsc;
|
||||
}
|
||||
@@ -186,7 +195,8 @@ static void my_sc_open(lv_app_inst_t * app, lv_obj_t * sc)
|
||||
sc_data->bar_cpu = lv_bar_create(sc, NULL);
|
||||
lv_obj_set_size(sc_data->bar_cpu, w, 5 * lv_obj_get_height(sc) / 8);
|
||||
lv_obj_align(sc_data->bar_cpu, NULL, LV_ALIGN_IN_BOTTOM_LEFT, w, - lv_obj_get_height(sc) / 8);
|
||||
lv_bar_set_style_indic(sc_data->bar_cpu, &cpu_bars);
|
||||
lv_obj_set_style(sc_data->bar_cpu, &cpu_bar_bg);
|
||||
lv_bar_set_style_indic(sc_data->bar_cpu, &cpu_bar_indic);
|
||||
lv_obj_set_click(sc_data->bar_cpu, false);
|
||||
lv_bar_set_range(sc_data->bar_cpu, 0, 100);
|
||||
lv_obj_t * label = lv_label_create(sc_data->bar_cpu, NULL);
|
||||
@@ -195,7 +205,8 @@ static void my_sc_open(lv_app_inst_t * app, lv_obj_t * sc)
|
||||
|
||||
sc_data->bar_mem = lv_bar_create(sc, sc_data->bar_cpu);
|
||||
lv_obj_align(sc_data->bar_mem, sc_data->bar_cpu, LV_ALIGN_OUT_RIGHT_MID, w, 0);
|
||||
lv_bar_set_style_indic(sc_data->bar_mem, &mem_bars);
|
||||
lv_obj_set_style(sc_data->bar_mem, &mem_bar_bg);
|
||||
lv_bar_set_style_indic(sc_data->bar_mem, &mem_bar_indic);
|
||||
label = lv_label_create(sc_data->bar_mem, NULL);
|
||||
lv_label_set_text(label, "M\nE\nM");
|
||||
lv_obj_align(label, NULL, LV_ALIGN_CENTER, 0, 0);
|
||||
@@ -223,6 +234,8 @@ static void my_win_open(lv_app_inst_t * app, lv_obj_t * win)
|
||||
{
|
||||
my_win_data_t * win_data = app->win_data;
|
||||
|
||||
lv_cont_set_layout(lv_page_get_scrl(lv_win_get_page(win)), LV_CONT_LAYOUT_PRETTY);
|
||||
|
||||
/*Create a chart with two data lines*/
|
||||
win_data->chart = lv_chart_create(win, NULL);
|
||||
lv_obj_set_size(win_data->chart, LV_HOR_RES / 2, LV_VER_RES / 2);
|
||||
@@ -231,8 +244,8 @@ static void my_win_open(lv_app_inst_t * app, lv_obj_t * win)
|
||||
lv_chart_set_range(win_data->chart, 0, 100);
|
||||
lv_chart_set_type(win_data->chart, LV_CHART_LINE);
|
||||
lv_chart_set_dl_width(win_data->chart, 2 * LV_DOWNSCALE);
|
||||
win_data->cpu_dl = lv_chart_add_dataline(win_data->chart, COLOR_RED);
|
||||
win_data->mem_dl = lv_chart_add_dataline(win_data->chart, COLOR_BLUE);
|
||||
win_data->cpu_dl = lv_chart_add_data_line(win_data->chart, COLOR_RED);
|
||||
win_data->mem_dl = lv_chart_add_data_line(win_data->chart, COLOR_BLUE);
|
||||
|
||||
uint16_t i;
|
||||
for(i = 0; i < LV_APP_SYSMON_PNUM; i ++) {
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
/*********************
|
||||
* DEFINES
|
||||
*********************/
|
||||
#define OBJ_PAD (LV_DPI / 4)
|
||||
#define OBJ_PAD (LV_DPI / 12)
|
||||
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
@@ -144,9 +144,17 @@ static void my_app_run(lv_app_inst_t * app, void * conf)
|
||||
{
|
||||
/*Initialize the application*/
|
||||
my_app_data_t * app_data = app->app_data;
|
||||
app_data->com_type = LV_APP_COM_TYPE_CHAR;
|
||||
app_data->format = LV_APP_TERMINAL_FORMAT_ASCII;
|
||||
|
||||
if(conf != NULL) {
|
||||
app_data->com_type = ((lv_app_terminal_conf_t * ) conf)->com_type;
|
||||
app_data->format = ((lv_app_terminal_conf_t * ) conf)->format;
|
||||
} else {
|
||||
app_data->com_type = LV_APP_COM_TYPE_CHAR;
|
||||
app_data->format = LV_APP_TERMINAL_FORMAT_ASCII;
|
||||
}
|
||||
|
||||
app_data->last_sender = NULL;
|
||||
|
||||
memset(app_data->txt, 0, sizeof(app_data->txt));
|
||||
}
|
||||
|
||||
@@ -326,7 +334,7 @@ static void my_conf_open(lv_app_inst_t * app, lv_obj_t * conf_win)
|
||||
*/
|
||||
static lv_action_res_t win_ta_rel_action(lv_obj_t * ta, lv_dispi_t * dispi)
|
||||
{
|
||||
lv_app_kb_open(ta, LV_APP_KB_MODE_TXT, NULL, win_ta_kb_ok_action);
|
||||
lv_app_kb_open(ta, LV_APP_KB_MODE_TXT | LV_APP_KB_MODE_WIN_RESIZE, NULL, win_ta_kb_ok_action);
|
||||
|
||||
return LV_ACTION_RES_OK;
|
||||
}
|
||||
|
||||
@@ -28,7 +28,8 @@ typedef enum
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
||||
lv_app_terminal_format_t format; /*Data display format*/
|
||||
lv_app_com_type_t com_type; /*The listened communication type (channel) */
|
||||
}lv_app_terminal_conf_t;
|
||||
|
||||
/**********************
|
||||
|
||||
Reference in New Issue
Block a user