更新 按键修改进度条显示

This commit is contained in:
吴俊潮 2024-12-27 16:51:57 +08:00
parent a15cf13af7
commit 1d1f9c2689
290 changed files with 226856 additions and 33375 deletions

View File

@ -2,7 +2,7 @@
* @Author: wujunchao wujunchao@wuxismart.com
* @Date: 2024-12-27 11:51:06
* @LastEditors: wujunchao wujunchao@wuxismart.com
* @LastEditTime: 2024-12-27 12:31:59
* @LastEditTime: 2024-12-27 15:46:57
* @FilePath: \signal_generator\App\APP_WU\Inc\apps_gather.h
* @Description: ,`customMade`, koroFileHeader查看配置 : https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
@ -29,9 +29,12 @@
#include "gui_guider.h" // Gui Guider 生成的界面和控件的声明
#include "events_init.h" // Gui Guider 生成的初始化事件、回调函数
extern lv_ui guider_ui;
//written bt WuJunChao
#include "timer.h"
void menu_test(void);

View File

@ -2,15 +2,47 @@
* @Author: wujunchao wujunchao@wuxismart.com
* @Date: 2024-12-27 11:50:56
* @LastEditors: wujunchao wujunchao@wuxismart.com
* @LastEditTime: 2024-12-27 11:53:10
* @LastEditTime: 2024-12-27 16:15:19
* @FilePath: \signal_generator\App\APP_WU\Src\apps_gather.c
* @Description: ,`customMade`, koroFileHeader查看配置 : https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
#include "apps_gather.h"
//用于头文件打包汇总
#include "apps_gather.h" //用于头文件打包汇总
int bar1_v = 0, bar2_v = 0, bar3_v = 0;
void menu_test(void)
{
switch(key)
{
case 68:
{
key = 0;
bar1_v = ( bar1_v > 90 )?( 0 ):( bar1_v + 10 );
lv_bar_set_value(guider_ui.screen_bar_1, bar1_v, LV_ANIM_OFF);
}
break;
case 69:
{
key = 0;
bar2_v = ( bar2_v > 90 )?( 0 ):( bar2_v + 10 );
lv_bar_set_value(guider_ui.screen_bar_2, bar2_v, LV_ANIM_OFF);
}
break;
case 70:
{
key = 0;
bar3_v = ( bar3_v > 90 )?( 0 ):( bar3_v + 10 );
lv_bar_set_value(guider_ui.screen_bar_3, bar3_v, LV_ANIM_OFF);
}
break;
default:
{
}
break;
}
}

View File

@ -4,7 +4,7 @@
#include <STC15F2K60S2.H>
#include <chinese_code.h>
//液晶屏IC所需要的信号线的接口定义
//液晶屏IC所需要的信号线的接口定义
sbit cs1=P3^5;
sbit reset=P3^3;
sbit rs=P3^0;
@ -12,9 +12,9 @@ sbit sclk=P3^4;
sbit sid=P3^2;
sbit IM1=P3^6;
sbit IM2=P3^7;
sbit key=P2^0; //P2.0口与GND之间接一个按键
sbit key=P2^0; //P2.0口与GND之间接一个按键
/*写指令到LCD模块*/
/*写指令到LCD模块*/
void transfer_command(int data1)
{
char i;
@ -31,7 +31,7 @@ void transfer_command(int data1)
cs1=1;
}
/*写数据到LCD模块*/
/*写数据到LCD模块*/
void transfer_data(int data1)
{
char i;
@ -48,7 +48,7 @@ void transfer_data(int data1)
cs1=1;
}
//连写2个字节即16位数据到LCD模块
//连写2个字节即16位数据到LCD模块
void transfer_data_16(uint data_16bit)
{
transfer_data(data_16bit>>8);
@ -80,13 +80,13 @@ void lcd_initial()
//************* Start Initial Sequence **********//
//------------------------------display and color format setting--------------------------------//
transfer_command(0x36); //行扫描顺序及RGB列扫描顺序横放/竖放
transfer_command(0x36); //行扫描顺序及RGB列扫描顺序横放/竖放
transfer_data(0x00);
transfer_data(0x48);
transfer_command(0xB6); //显示功能设置:列/行 显示顺序
transfer_command(0xB6); //显示功能设置:列/行 显示顺序
transfer_data(0x0A);
transfer_data(0x82); //改变SOURCE线的方向0xa2左到右0x82右到左
transfer_data(0x82); //改变SOURCE线的方向0xa2左到右0x82右到左
transfer_command(0x3a); //256K 16bit/pixel
transfer_data(0x05);
@ -148,26 +148,26 @@ void lcd_initial()
transfer_data(0x1b);
transfer_data(0x1e);
transfer_command(0x11); //退出睡眠
transfer_command(0x11); //退出睡眠
delay(200);
transfer_command(0x29); //打开显示
transfer_command(0x29); //打开显示
}
//定义窗口坐标开始坐标XS,YS)以及窗口大小x_total,y_total)
//定义窗口坐标开始坐标XS,YS)以及窗口大小x_total,y_total)
void lcd_address(int XS,int YS,int x_total,int y_total)
{
int XE,YE;
XE=XS+x_total-1;
YE=YS+y_total-1;
transfer_command(0x2a); // 设置X开始及结束的地址
transfer_data_16(XS); // X开始地址(16位
transfer_data_16(XE); // X结束地址(16位
transfer_command(0x2a); // 设置X开始及结束的地址
transfer_data_16(XS); // X开始地址(16位
transfer_data_16(XE); // X结束地址(16位
transfer_command(0x2b); // 设置Y开始及结束的地址
transfer_data_16(YS); // Y开始地址(16位
transfer_data_16(YE); // Y结束地址(16位
transfer_command(0x2b); // 设置Y开始及结束的地址
transfer_data_16(YS); // Y开始地址(16位
transfer_data_16(YE); // Y结束地址(16位
transfer_command(0x2c); // 写数据开始
transfer_command(0x2c); // 写数据开始
}
void mono_transfer_data_16(int mono_data,int font_color,int back_color)
@ -177,18 +177,18 @@ void mono_transfer_data_16(int mono_data,int font_color,int back_color)
{
if(mono_data&0x80)
{
transfer_data_16(font_color); //当数据是1时显示字体颜色
transfer_data_16(font_color); //当数据是1时显示字体颜色
}
else
{
transfer_data_16(back_color); //当数据是0时显示底色
transfer_data_16(back_color); //当数据是0时显示底色
}
mono_data<<=1;
}
}
//全屏显示一种颜色
//全屏显示一种颜色
void display_color(int color_data)
{
int i,j;
@ -205,7 +205,7 @@ void display_color(int color_data)
void display_black(void)
{
int i,j,k;
transfer_command(0x2c); // 写数据开始
transfer_command(0x2c); // 写数据开始
for(i=0;i<240;i++)
{
transfer_data_16(0xffff);
@ -231,7 +231,7 @@ void display_black(void)
}
}
//显示8x16点阵的字符串
//显示8x16点阵的字符串
void disp_string_8x16(int x,int y,char *text,int font_color,int back_color)
{
int i=0,j,k;
@ -243,7 +243,7 @@ void disp_string_8x16(int x,int y,char *text,int font_color,int back_color)
lcd_address(x,y,8,16);
for(k=0;k<16;k++)
{
mono_transfer_data_16(ascii_table_8x16[j*16+k],font_color,back_color); //?a??"ascii_table_8x16[]"?a??êy×é?ú"ASCII_TABLE_5X8_8X16_horizontal.h"à?
mono_transfer_data_16(ascii_table_8x16[j*16+k],font_color,back_color); //?a??"ascii_table_8x16[]"?a??êy×é?ú"ASCII_TABLE_5X8_8X16_horizontal.h"à?
}
x+=8;
i++;
@ -258,11 +258,11 @@ void display_string_16x16(int x,int y,uchar *text,int font_color,int back_color)
uchar i,j,k;
uint address;
j = 0;
while(text[j] != '\0') //'\0' 字符串结束标志
while(text[j] != '\0') //'\0' 字符串结束标志
{
i = 0;
address = 1;
while(Chinese_horizontal_text_16x16[i] > 0x7e) // >0x7f即说明不是ASCII码字符
while(Chinese_horizontal_text_16x16[i] > 0x7e) // >0x7f即说明不是ASCII码字符
{
if(Chinese_horizontal_text_16x16[i] == text[j])
{
@ -280,7 +280,7 @@ void display_string_16x16(int x,int y,uchar *text,int font_color,int back_color)
x+=16;
}
if(address != 1)// 显示汉字
if(address != 1)// 显示汉字
{
lcd_address(x,y,16,16);
for(i=0;i<2;i++)
@ -293,7 +293,7 @@ void display_string_16x16(int x,int y,uchar *text,int font_color,int back_color)
}
j+=2;
}
else //显示空白字符
else //显示空白字符
{
lcd_address(x,y,16,16);
for(i = 0; i <2; i++)
@ -310,7 +310,7 @@ void display_string_16x16(int x,int y,uchar *text,int font_color,int back_color)
}
//显示32x32点阵的单色的图像
//显示32x32点阵的单色的图像
void disp_32x32(int x,int y,char *dp,int font_color,int back_color)
{
int i,j;
@ -325,7 +325,7 @@ void disp_32x32(int x,int y,char *dp,int font_color,int back_color)
}
}
//显示一幅彩图
//显示一幅彩图
void display_image(int x,int y,uchar *dp)
{
uchar i,j,k=0;
@ -334,9 +334,9 @@ void display_image(int x,int y,uchar *dp)
{
for(j=0;j<160;j++)
{
transfer_data(*dp); //传一个像素的图片数据的高位
transfer_data(*dp); //传一个像素的图片数据的高位
dp++;
transfer_data(*dp); //传一个像素的图片数据的低位
transfer_data(*dp); //传一个像素的图片数据的低位
dp++;
}
}
@ -345,12 +345,12 @@ void display_image(int x,int y,uchar *dp)
void main(void)
{
P1M1=0x00;
P1M0=0x00; //P1配置为准双向
P1M0=0x00; //P1配置为准双向
P2M1=0x00;
P2M0=0x00; //P2配置为准双向
P2M0=0x00; //P2配置为准双向
P3M1=0x00;
P3M0=0x00; //P3配置为准双向
IM1=1; //IM1=0、IM2=0并行接口IM1=1、IM2=1串行接口
P3M0=0x00; //P3配置为准双向
IM1=1; //IM1=0、IM2=0并行接口IM1=1、IM2=1串行接口
IM2=1;
lcd_initial();
while(1)
@ -362,19 +362,19 @@ void main(void)
disp_32x32(40+32*3,8,dian_32x32,white,blue);
disp_32x32(40+32*4,8,zi_32x32,white,blue);
display_string_16x16(24,56,"深圳市晶联讯电子有限公司",white,blue);
display_string_16x16(48,88,"型号",white,blue);
display_string_16x16(24,56,"深圳市晶联讯电子有限公司",white,blue);
display_string_16x16(48,88,"型号",white,blue);
disp_string_8x16(80,88,":JLX240-00303-BN",white,blue);
display_string_16x16(48,120,"视窗",white,blue);
display_string_16x16(48,120,"视窗",white,blue);
disp_string_8x16(80,120,":36.7x48.9mm",white,blue);
display_string_16x16(48,152,"驱动",white,blue);
display_string_16x16(48,152,"驱动",white,blue);
disp_string_8x16(80,152,"IC:ST7789V",white,blue);
display_string_16x16(0,184,"经营宗旨:制造高品质产品及服务",white,blue);
display_string_16x16(0,216,"质量方针:客户至上,质量保证",white,blue);
display_string_16x16(79,236,"持续改进,服务到位",white,blue);
display_string_16x16(0,270,"经营目标:做最好的液晶模块厂家",white,blue);
display_string_16x16(79,292,"做客户信得过的企业",white,blue);
display_string_16x16(0,184,"经营宗旨:制造高品质产品及服务",white,blue);
display_string_16x16(0,216,"质量方针:客户至上,质量保证",white,blue);
display_string_16x16(79,236,"持续改进,服务到位",white,blue);
display_string_16x16(0,270,"经营目标:做最好的液晶模块厂家",white,blue);
display_string_16x16(79,292,"做客户信得过的企业",white,blue);
Switch();
display_image(0,0,pic1);

View File

@ -183,6 +183,7 @@ void start_task_lcd(void const * argument)
for (;;)
{
// lcd_menu();
menu_test();
lv_timer_handler(); //LVGL刷新任务

View File

@ -35,7 +35,7 @@
/* Private typedef -----------------------------------------------------------*/
/* USER CODE BEGIN PTD */
lv_ui guider_ui; // 声明 界面对象
/* USER CODE END PTD */
/* Private define ------------------------------------------------------------*/
@ -113,16 +113,16 @@ int main(void)
tm1650_init(&hi2c1);
lcd_initial(); // LCD初始化LCD任务中也有一次初始化
lv_init(); // LVGL 初始<EFBFBD>?????
lv_port_disp_init(); // 注册LVGL的显示任<EFBFBD>?????
//lv_port_indev_init(); // 注册LVGL的触屏检测任<EFBFBD>?????
lv_init(); // LVGL 初始
lv_port_disp_init(); // 注册LVGL的显示任务初始化
//lv_port_indev_init(); // 注册LVGL的触屏检测任务初始化
lv_ui guider_ui; // 声明 界面对象
// lv_ui guider_ui; // 声明 界面对象
HAL_TIM_Base_Start_IT(&htim6);
setup_ui(&guider_ui); // 初始<EFBFBD>???? UI
events_init(&guider_ui); // 初始<EFBFBD>???? 事件
setup_ui(&guider_ui); // 初始UI
events_init(&guider_ui); // 初始事件
/* USER CODE END 2 */

View File

@ -16,6 +16,24 @@
#endif
static void screen_bar_1_event_handler (lv_event_t *e)
{
lv_event_code_t code = lv_event_get_code(e);
switch (code) {
case LV_EVENT_VALUE_CHANGED:
{
break;
}
default:
break;
}
}
void events_init_screen (lv_ui *ui)
{
lv_obj_add_event_cb(ui->screen_bar_1, screen_bar_1_event_handler, LV_EVENT_ALL, ui);
}
void events_init(lv_ui *ui)
{

View File

@ -18,6 +18,7 @@ extern "C" {
void events_init(lv_ui *ui);
void events_init_screen(lv_ui *ui);
#ifdef __cplusplus
}

View File

@ -20,16 +20,9 @@ typedef struct
lv_obj_t *screen;
bool screen_del;
lv_obj_t *screen_spangroup_1;
lv_span_t *screen_spangroup_1_span;
lv_obj_t *screen_spangroup_2;
lv_span_t *screen_spangroup_2_span;
lv_obj_t *screen_spangroup_3;
lv_span_t *screen_spangroup_3_span;
lv_obj_t *screen_spangroup_4;
lv_span_t *screen_spangroup_4_span;
lv_obj_t *screen_spangroup_5;
lv_span_t *screen_spangroup_5_span;
lv_obj_t *screen_bar_1;
lv_obj_t *screen_bar_2;
lv_obj_t *screen_bar_3;
}lv_ui;
typedef void (*ui_setup_scr_t)(lv_ui * ui);
@ -54,7 +47,6 @@ extern lv_ui guider_ui;
void setup_scr_screen(lv_ui *ui);
LV_FONT_DECLARE(lv_font_montserratMedium_18)
#ifdef __cplusplus

View File

@ -25,153 +25,74 @@ void setup_scr_screen(lv_ui *ui)
//Write style for screen, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
lv_obj_set_style_bg_opa(ui->screen, 239, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_color(ui->screen, lv_color_hex(0xff5e00), LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_color(ui->screen, lv_color_hex(0x00ffa8), LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_grad_dir(ui->screen, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
//Write codes screen_spangroup_1
ui->screen_spangroup_1 = lv_spangroup_create(ui->screen);
lv_spangroup_set_align(ui->screen_spangroup_1, LV_TEXT_ALIGN_LEFT);
lv_spangroup_set_overflow(ui->screen_spangroup_1, LV_SPAN_OVERFLOW_CLIP);
lv_spangroup_set_mode(ui->screen_spangroup_1, LV_SPAN_MODE_BREAK);
//create span
ui->screen_spangroup_1_span = lv_spangroup_new_span(ui->screen_spangroup_1);
lv_span_set_text(ui->screen_spangroup_1_span, "left top");
lv_style_set_text_color(&ui->screen_spangroup_1_span->style, lv_color_hex(0x000000));
lv_style_set_text_decor(&ui->screen_spangroup_1_span->style, LV_TEXT_DECOR_NONE);
lv_style_set_text_font(&ui->screen_spangroup_1_span->style, &lv_font_montserratMedium_18);
lv_obj_set_pos(ui->screen_spangroup_1, 28, 38);
lv_obj_set_size(ui->screen_spangroup_1, 81, 34);
//Write codes screen_bar_1
ui->screen_bar_1 = lv_bar_create(ui->screen);
lv_obj_set_style_anim_time(ui->screen_bar_1, 1000, 0);
lv_bar_set_mode(ui->screen_bar_1, LV_BAR_MODE_NORMAL);
lv_bar_set_range(ui->screen_bar_1, 0, 100);
lv_bar_set_value(ui->screen_bar_1, 50, LV_ANIM_OFF);
lv_obj_set_pos(ui->screen_bar_1, 30, 33);
lv_obj_set_size(ui->screen_bar_1, 177, 29);
//Write style state: LV_STATE_DEFAULT for &style_screen_spangroup_1_main_main_default
static lv_style_t style_screen_spangroup_1_main_main_default;
ui_init_style(&style_screen_spangroup_1_main_main_default);
//Write style for screen_bar_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
lv_obj_set_style_bg_opa(ui->screen_bar_1, 195, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_color(ui->screen_bar_1, lv_color_hex(0xfbfbfb), LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_grad_dir(ui->screen_bar_1, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_radius(ui->screen_bar_1, 10, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_shadow_width(ui->screen_bar_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_style_set_border_width(&style_screen_spangroup_1_main_main_default, 0);
lv_style_set_radius(&style_screen_spangroup_1_main_main_default, 0);
lv_style_set_bg_opa(&style_screen_spangroup_1_main_main_default, 0);
lv_style_set_pad_top(&style_screen_spangroup_1_main_main_default, 0);
lv_style_set_pad_right(&style_screen_spangroup_1_main_main_default, 0);
lv_style_set_pad_bottom(&style_screen_spangroup_1_main_main_default, 0);
lv_style_set_pad_left(&style_screen_spangroup_1_main_main_default, 0);
lv_style_set_shadow_width(&style_screen_spangroup_1_main_main_default, 0);
lv_obj_add_style(ui->screen_spangroup_1, &style_screen_spangroup_1_main_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_spangroup_refr_mode(ui->screen_spangroup_1);
//Write style for screen_bar_1, Part: LV_PART_INDICATOR, State: LV_STATE_DEFAULT.
lv_obj_set_style_bg_opa(ui->screen_bar_1, 255, LV_PART_INDICATOR|LV_STATE_DEFAULT);
lv_obj_set_style_bg_color(ui->screen_bar_1, lv_color_hex(0x2195f6), LV_PART_INDICATOR|LV_STATE_DEFAULT);
lv_obj_set_style_bg_grad_dir(ui->screen_bar_1, LV_GRAD_DIR_NONE, LV_PART_INDICATOR|LV_STATE_DEFAULT);
lv_obj_set_style_radius(ui->screen_bar_1, 10, LV_PART_INDICATOR|LV_STATE_DEFAULT);
//Write codes screen_spangroup_2
ui->screen_spangroup_2 = lv_spangroup_create(ui->screen);
lv_spangroup_set_align(ui->screen_spangroup_2, LV_TEXT_ALIGN_LEFT);
lv_spangroup_set_overflow(ui->screen_spangroup_2, LV_SPAN_OVERFLOW_CLIP);
lv_spangroup_set_mode(ui->screen_spangroup_2, LV_SPAN_MODE_BREAK);
//create span
ui->screen_spangroup_2_span = lv_spangroup_new_span(ui->screen_spangroup_2);
lv_span_set_text(ui->screen_spangroup_2_span, "right top");
lv_style_set_text_color(&ui->screen_spangroup_2_span->style, lv_color_hex(0x000000));
lv_style_set_text_decor(&ui->screen_spangroup_2_span->style, LV_TEXT_DECOR_NONE);
lv_style_set_text_font(&ui->screen_spangroup_2_span->style, &lv_font_montserratMedium_18);
lv_obj_set_pos(ui->screen_spangroup_2, 140, 38);
lv_obj_set_size(ui->screen_spangroup_2, 81, 34);
//Write codes screen_bar_2
ui->screen_bar_2 = lv_bar_create(ui->screen);
lv_obj_set_style_anim_time(ui->screen_bar_2, 1000, 0);
lv_bar_set_mode(ui->screen_bar_2, LV_BAR_MODE_NORMAL);
lv_bar_set_range(ui->screen_bar_2, 0, 100);
lv_bar_set_value(ui->screen_bar_2, 50, LV_ANIM_OFF);
lv_obj_set_pos(ui->screen_bar_2, 30, 146);
lv_obj_set_size(ui->screen_bar_2, 177, 29);
//Write style state: LV_STATE_DEFAULT for &style_screen_spangroup_2_main_main_default
static lv_style_t style_screen_spangroup_2_main_main_default;
ui_init_style(&style_screen_spangroup_2_main_main_default);
//Write style for screen_bar_2, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
lv_obj_set_style_bg_opa(ui->screen_bar_2, 195, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_color(ui->screen_bar_2, lv_color_hex(0xfbfbfb), LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_grad_dir(ui->screen_bar_2, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_radius(ui->screen_bar_2, 10, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_shadow_width(ui->screen_bar_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_style_set_border_width(&style_screen_spangroup_2_main_main_default, 0);
lv_style_set_radius(&style_screen_spangroup_2_main_main_default, 0);
lv_style_set_bg_opa(&style_screen_spangroup_2_main_main_default, 0);
lv_style_set_pad_top(&style_screen_spangroup_2_main_main_default, 0);
lv_style_set_pad_right(&style_screen_spangroup_2_main_main_default, 0);
lv_style_set_pad_bottom(&style_screen_spangroup_2_main_main_default, 0);
lv_style_set_pad_left(&style_screen_spangroup_2_main_main_default, 0);
lv_style_set_shadow_width(&style_screen_spangroup_2_main_main_default, 0);
lv_obj_add_style(ui->screen_spangroup_2, &style_screen_spangroup_2_main_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_spangroup_refr_mode(ui->screen_spangroup_2);
//Write style for screen_bar_2, Part: LV_PART_INDICATOR, State: LV_STATE_DEFAULT.
lv_obj_set_style_bg_opa(ui->screen_bar_2, 255, LV_PART_INDICATOR|LV_STATE_DEFAULT);
lv_obj_set_style_bg_color(ui->screen_bar_2, lv_color_hex(0x2195f6), LV_PART_INDICATOR|LV_STATE_DEFAULT);
lv_obj_set_style_bg_grad_dir(ui->screen_bar_2, LV_GRAD_DIR_NONE, LV_PART_INDICATOR|LV_STATE_DEFAULT);
lv_obj_set_style_radius(ui->screen_bar_2, 10, LV_PART_INDICATOR|LV_STATE_DEFAULT);
//Write codes screen_spangroup_3
ui->screen_spangroup_3 = lv_spangroup_create(ui->screen);
lv_spangroup_set_align(ui->screen_spangroup_3, LV_TEXT_ALIGN_LEFT);
lv_spangroup_set_overflow(ui->screen_spangroup_3, LV_SPAN_OVERFLOW_CLIP);
lv_spangroup_set_mode(ui->screen_spangroup_3, LV_SPAN_MODE_BREAK);
//create span
ui->screen_spangroup_3_span = lv_spangroup_new_span(ui->screen_spangroup_3);
lv_span_set_text(ui->screen_spangroup_3_span, "middle");
lv_style_set_text_color(&ui->screen_spangroup_3_span->style, lv_color_hex(0x000000));
lv_style_set_text_decor(&ui->screen_spangroup_3_span->style, LV_TEXT_DECOR_NONE);
lv_style_set_text_font(&ui->screen_spangroup_3_span->style, &lv_font_montserratMedium_18);
lv_obj_set_pos(ui->screen_spangroup_3, 83, 145);
lv_obj_set_size(ui->screen_spangroup_3, 81, 34);
//Write codes screen_bar_3
ui->screen_bar_3 = lv_bar_create(ui->screen);
lv_obj_set_style_anim_time(ui->screen_bar_3, 1000, 0);
lv_bar_set_mode(ui->screen_bar_3, LV_BAR_MODE_NORMAL);
lv_bar_set_range(ui->screen_bar_3, 0, 100);
lv_bar_set_value(ui->screen_bar_3, 50, LV_ANIM_OFF);
lv_obj_set_pos(ui->screen_bar_3, 30, 258);
lv_obj_set_size(ui->screen_bar_3, 177, 29);
//Write style state: LV_STATE_DEFAULT for &style_screen_spangroup_3_main_main_default
static lv_style_t style_screen_spangroup_3_main_main_default;
ui_init_style(&style_screen_spangroup_3_main_main_default);
//Write style for screen_bar_3, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
lv_obj_set_style_bg_opa(ui->screen_bar_3, 195, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_color(ui->screen_bar_3, lv_color_hex(0xfbfbfb), LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_bg_grad_dir(ui->screen_bar_3, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_radius(ui->screen_bar_3, 10, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_obj_set_style_shadow_width(ui->screen_bar_3, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_style_set_border_width(&style_screen_spangroup_3_main_main_default, 0);
lv_style_set_radius(&style_screen_spangroup_3_main_main_default, 0);
lv_style_set_bg_opa(&style_screen_spangroup_3_main_main_default, 0);
lv_style_set_pad_top(&style_screen_spangroup_3_main_main_default, 0);
lv_style_set_pad_right(&style_screen_spangroup_3_main_main_default, 0);
lv_style_set_pad_bottom(&style_screen_spangroup_3_main_main_default, 0);
lv_style_set_pad_left(&style_screen_spangroup_3_main_main_default, 0);
lv_style_set_shadow_width(&style_screen_spangroup_3_main_main_default, 0);
lv_obj_add_style(ui->screen_spangroup_3, &style_screen_spangroup_3_main_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_spangroup_refr_mode(ui->screen_spangroup_3);
//Write codes screen_spangroup_4
ui->screen_spangroup_4 = lv_spangroup_create(ui->screen);
lv_spangroup_set_align(ui->screen_spangroup_4, LV_TEXT_ALIGN_LEFT);
lv_spangroup_set_overflow(ui->screen_spangroup_4, LV_SPAN_OVERFLOW_CLIP);
lv_spangroup_set_mode(ui->screen_spangroup_4, LV_SPAN_MODE_BREAK);
//create span
ui->screen_spangroup_4_span = lv_spangroup_new_span(ui->screen_spangroup_4);
lv_span_set_text(ui->screen_spangroup_4_span, "left bot");
lv_style_set_text_color(&ui->screen_spangroup_4_span->style, lv_color_hex(0x000000));
lv_style_set_text_decor(&ui->screen_spangroup_4_span->style, LV_TEXT_DECOR_NONE);
lv_style_set_text_font(&ui->screen_spangroup_4_span->style, &lv_font_montserratMedium_18);
lv_obj_set_pos(ui->screen_spangroup_4, 25, 247);
lv_obj_set_size(ui->screen_spangroup_4, 81, 34);
//Write style state: LV_STATE_DEFAULT for &style_screen_spangroup_4_main_main_default
static lv_style_t style_screen_spangroup_4_main_main_default;
ui_init_style(&style_screen_spangroup_4_main_main_default);
lv_style_set_border_width(&style_screen_spangroup_4_main_main_default, 0);
lv_style_set_radius(&style_screen_spangroup_4_main_main_default, 0);
lv_style_set_bg_opa(&style_screen_spangroup_4_main_main_default, 0);
lv_style_set_pad_top(&style_screen_spangroup_4_main_main_default, 0);
lv_style_set_pad_right(&style_screen_spangroup_4_main_main_default, 0);
lv_style_set_pad_bottom(&style_screen_spangroup_4_main_main_default, 0);
lv_style_set_pad_left(&style_screen_spangroup_4_main_main_default, 0);
lv_style_set_shadow_width(&style_screen_spangroup_4_main_main_default, 0);
lv_obj_add_style(ui->screen_spangroup_4, &style_screen_spangroup_4_main_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_spangroup_refr_mode(ui->screen_spangroup_4);
//Write codes screen_spangroup_5
ui->screen_spangroup_5 = lv_spangroup_create(ui->screen);
lv_spangroup_set_align(ui->screen_spangroup_5, LV_TEXT_ALIGN_LEFT);
lv_spangroup_set_overflow(ui->screen_spangroup_5, LV_SPAN_OVERFLOW_CLIP);
lv_spangroup_set_mode(ui->screen_spangroup_5, LV_SPAN_MODE_BREAK);
//create span
ui->screen_spangroup_5_span = lv_spangroup_new_span(ui->screen_spangroup_5);
lv_span_set_text(ui->screen_spangroup_5_span, "right bot");
lv_style_set_text_color(&ui->screen_spangroup_5_span->style, lv_color_hex(0x000000));
lv_style_set_text_decor(&ui->screen_spangroup_5_span->style, LV_TEXT_DECOR_NONE);
lv_style_set_text_font(&ui->screen_spangroup_5_span->style, &lv_font_montserratMedium_18);
lv_obj_set_pos(ui->screen_spangroup_5, 145, 247);
lv_obj_set_size(ui->screen_spangroup_5, 81, 34);
//Write style state: LV_STATE_DEFAULT for &style_screen_spangroup_5_main_main_default
static lv_style_t style_screen_spangroup_5_main_main_default;
ui_init_style(&style_screen_spangroup_5_main_main_default);
lv_style_set_border_width(&style_screen_spangroup_5_main_main_default, 0);
lv_style_set_radius(&style_screen_spangroup_5_main_main_default, 0);
lv_style_set_bg_opa(&style_screen_spangroup_5_main_main_default, 0);
lv_style_set_pad_top(&style_screen_spangroup_5_main_main_default, 0);
lv_style_set_pad_right(&style_screen_spangroup_5_main_main_default, 0);
lv_style_set_pad_bottom(&style_screen_spangroup_5_main_main_default, 0);
lv_style_set_pad_left(&style_screen_spangroup_5_main_main_default, 0);
lv_style_set_shadow_width(&style_screen_spangroup_5_main_main_default, 0);
lv_obj_add_style(ui->screen_spangroup_5, &style_screen_spangroup_5_main_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);
lv_spangroup_refr_mode(ui->screen_spangroup_5);
//Write style for screen_bar_3, Part: LV_PART_INDICATOR, State: LV_STATE_DEFAULT.
lv_obj_set_style_bg_opa(ui->screen_bar_3, 255, LV_PART_INDICATOR|LV_STATE_DEFAULT);
lv_obj_set_style_bg_color(ui->screen_bar_3, lv_color_hex(0x2195f6), LV_PART_INDICATOR|LV_STATE_DEFAULT);
lv_obj_set_style_bg_grad_dir(ui->screen_bar_3, LV_GRAD_DIR_NONE, LV_PART_INDICATOR|LV_STATE_DEFAULT);
lv_obj_set_style_radius(ui->screen_bar_3, 10, LV_PART_INDICATOR|LV_STATE_DEFAULT);
//The custom code of screen.
@ -179,4 +100,6 @@ void setup_scr_screen(lv_ui *ui)
//Update current screen layout.
lv_obj_update_layout(ui->screen);
//Init events for screen.
events_init_screen(ui);
}

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -220,6 +220,11 @@
<WinNumber>1</WinNumber>
<ItemText>fswatch,0x0A</ItemText>
</Ww>
<Ww>
<count>13</count>
<WinNumber>1</WinNumber>
<ItemText>bar_v,0x0A</ItemText>
</Ww>
</WatchWindow1>
<MemoryWindow1>
<Mm>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More