parent
1d1f9c2689
commit
580b685594
|
@ -21,6 +21,8 @@
|
||||||
#include "hart.h"
|
#include "hart.h"
|
||||||
#include "rn7302.h"
|
#include "rn7302.h"
|
||||||
#include "SIG24130.h"
|
#include "SIG24130.h"
|
||||||
|
#include "FreeRTOS.h"
|
||||||
|
#include "task.h"
|
||||||
|
|
||||||
//LVGL
|
//LVGL
|
||||||
#include "lvgl.h" // 它为整个LVGL提供了更完整的头文件引用
|
#include "lvgl.h" // 它为整个LVGL提供了更完整的头文件引用
|
||||||
|
@ -34,7 +36,10 @@ extern lv_ui guider_ui;
|
||||||
//written bt WuJunChao
|
//written bt WuJunChao
|
||||||
#include "timer.h"
|
#include "timer.h"
|
||||||
|
|
||||||
void menu_test(void);
|
// void menu_test2(void); //竖屏,三个进度条,sggt_test_02
|
||||||
|
void menu_test3(void); //横屏,2个界面,sggt_test_03
|
||||||
|
void scr_init_run(void);
|
||||||
|
void scr_main_run(void);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2,38 +2,117 @@
|
||||||
* @Author: wujunchao wujunchao@wuxismart.com
|
* @Author: wujunchao wujunchao@wuxismart.com
|
||||||
* @Date: 2024-12-27 11:50:56
|
* @Date: 2024-12-27 11:50:56
|
||||||
* @LastEditors: wujunchao wujunchao@wuxismart.com
|
* @LastEditors: wujunchao wujunchao@wuxismart.com
|
||||||
* @LastEditTime: 2024-12-27 16:15:19
|
* @LastEditTime: 2024-12-28 16:46:49
|
||||||
* @FilePath: \signal_generator\App\APP_WU\Src\apps_gather.c
|
* @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
|
* @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;
|
uint8_t scr_init_bar1 = 0, scr_init_cnt = 0, scr_init_flag = 0;
|
||||||
void menu_test(void)
|
int tick_prv = -1, tick_cur = -1;
|
||||||
|
void menu_test3(void)
|
||||||
{
|
{
|
||||||
|
if(scr_init_flag == 0)
|
||||||
|
{
|
||||||
|
scr_init_run();
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
scr_main_run();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void scr_init_run(void)
|
||||||
|
{
|
||||||
|
if( scr_init_cnt <= 5 )
|
||||||
|
{
|
||||||
|
if( tick_prv == -1 )
|
||||||
|
{
|
||||||
|
tick_prv = xTaskGetTickCount();
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
tick_cur = xTaskGetTickCount();
|
||||||
|
if(tick_cur - tick_prv >= 1000)
|
||||||
|
{
|
||||||
|
tick_prv = -1;
|
||||||
|
tick_cur = -1;
|
||||||
|
|
||||||
|
scr_init_bar1 = scr_init_cnt*20;
|
||||||
|
lv_bar_set_value(guider_ui.screen_init_bar_1, scr_init_bar1, LV_ANIM_OFF);
|
||||||
|
scr_init_cnt ++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
if( tick_prv == -1 )
|
||||||
|
{
|
||||||
|
tick_prv = xTaskGetTickCount();
|
||||||
|
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
tick_cur = xTaskGetTickCount();
|
||||||
|
if(tick_cur - tick_prv >= 250)
|
||||||
|
{
|
||||||
|
scr_init_flag = 1;
|
||||||
|
tick_prv = -1;
|
||||||
|
tick_cur = -1;
|
||||||
|
|
||||||
|
// lv_scr_load_anim(guider_ui.screen_main, LV_SCR_LOAD_ANIM_FADE_OUT, 1000, 250, 1);
|
||||||
|
init_scr_del_flag(&guider_ui);
|
||||||
|
setup_scr_screen_main(&guider_ui);
|
||||||
|
lv_scr_load(guider_ui.screen_main);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t led_bri = 0;
|
||||||
|
void scr_main_run(void)
|
||||||
|
{
|
||||||
|
//LED_LCD
|
||||||
|
if( tick_prv == -1 )
|
||||||
|
{
|
||||||
|
tick_prv = xTaskGetTickCount();
|
||||||
|
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
tick_cur = xTaskGetTickCount();
|
||||||
|
if(tick_cur - tick_prv >= 1000)
|
||||||
|
{
|
||||||
|
tick_prv = -1;
|
||||||
|
tick_cur = -1;
|
||||||
|
|
||||||
|
led_bri = (led_bri == 0)?(255):(0);
|
||||||
|
lv_led_set_brightness(guider_ui.screen_main_led_1, led_bri);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//Menu_LCD
|
||||||
switch(key)
|
switch(key)
|
||||||
{
|
{
|
||||||
case 68:
|
case 71:
|
||||||
{
|
{
|
||||||
key = 0;
|
key = 0;
|
||||||
bar1_v = ( bar1_v > 90 )?( 0 ):( bar1_v + 10 );
|
lv_event_send(guider_ui.screen_main_menu_1_cont_1, LV_EVENT_CLICKED, NULL);
|
||||||
lv_bar_set_value(guider_ui.screen_bar_1, bar1_v, LV_ANIM_OFF);
|
lv_meter_set_indicator_value(guider_ui.screen_main_meter_1,guider_ui.screen_main_meter_1_scale_0_ndline_0, 25);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 69:
|
case 79:
|
||||||
{
|
{
|
||||||
key = 0;
|
key = 0;
|
||||||
bar2_v = ( bar2_v > 90 )?( 0 ):( bar2_v + 10 );
|
lv_event_send(guider_ui.screen_main_menu_1_cont_2, LV_EVENT_CLICKED, NULL);
|
||||||
lv_bar_set_value(guider_ui.screen_bar_2, bar2_v, LV_ANIM_OFF);
|
lv_meter_set_indicator_value(guider_ui.screen_main_meter_1, guider_ui.screen_main_meter_1_scale_0_ndline_0, 50);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 70:
|
case 87:
|
||||||
{
|
{
|
||||||
key = 0;
|
key = 0;
|
||||||
bar3_v = ( bar3_v > 90 )?( 0 ):( bar3_v + 10 );
|
lv_event_send(guider_ui.screen_main_menu_1_cont_3, LV_EVENT_CLICKED, NULL);
|
||||||
lv_bar_set_value(guider_ui.screen_bar_3, bar3_v, LV_ANIM_OFF);
|
lv_meter_set_indicator_value(guider_ui.screen_main_meter_1, guider_ui.screen_main_meter_1_scale_0_ndline_0, 75);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -45,5 +124,42 @@ void menu_test(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// int bar1_v = 0, bar2_v = 0, bar3_v = 0;
|
||||||
|
// void menu_test2(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;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -122,7 +122,7 @@ void MX_FREERTOS_Init(void) {
|
||||||
defaultTaskHandle = osThreadCreate(osThread(defaultTask), NULL);
|
defaultTaskHandle = osThreadCreate(osThread(defaultTask), NULL);
|
||||||
|
|
||||||
/* definition and creation of task_lcd */
|
/* definition and creation of task_lcd */
|
||||||
osThreadDef(task_lcd, start_task_lcd, osPriorityIdle, 0, 512);
|
osThreadDef(task_lcd, start_task_lcd, osPriorityIdle, 0, 1024);
|
||||||
task_lcdHandle = osThreadCreate(osThread(task_lcd), NULL);
|
task_lcdHandle = osThreadCreate(osThread(task_lcd), NULL);
|
||||||
|
|
||||||
/* definition and creation of task_hart */
|
/* definition and creation of task_hart */
|
||||||
|
@ -183,7 +183,7 @@ void start_task_lcd(void const * argument)
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
// lcd_menu();
|
// lcd_menu();
|
||||||
menu_test();
|
menu_test3();
|
||||||
|
|
||||||
lv_timer_handler(); //LVGL刷新任务
|
lv_timer_handler(); //LVGL刷新任务
|
||||||
|
|
||||||
|
|
|
@ -112,7 +112,7 @@ int main(void)
|
||||||
/* USER CODE BEGIN 2 */
|
/* USER CODE BEGIN 2 */
|
||||||
tm1650_init(&hi2c1);
|
tm1650_init(&hi2c1);
|
||||||
|
|
||||||
lcd_initial(); // LCD初始化,LCD任务中也有一次初始化
|
lcd_initial(); // LCD初始化
|
||||||
lv_init(); // LVGL 初始化
|
lv_init(); // LVGL 初始化
|
||||||
lv_port_disp_init(); // 注册LVGL的显示任务初始化
|
lv_port_disp_init(); // 注册LVGL的显示任务初始化
|
||||||
//lv_port_indev_init(); // 注册LVGL的触屏检测任务初始化
|
//lv_port_indev_init(); // 注册LVGL的触屏检测任务初始化
|
||||||
|
@ -121,7 +121,7 @@ int main(void)
|
||||||
|
|
||||||
HAL_TIM_Base_Start_IT(&htim6);
|
HAL_TIM_Base_Start_IT(&htim6);
|
||||||
|
|
||||||
setup_ui(&guider_ui); // 初始化UI
|
setup_ui(&guider_ui); // 初始化UI,设置与加载初始界面
|
||||||
events_init(&guider_ui); // 初始化事件
|
events_init(&guider_ui); // 初始化事件
|
||||||
|
|
||||||
/* USER CODE END 2 */
|
/* USER CODE END 2 */
|
||||||
|
@ -164,7 +164,12 @@ void SystemClock_Config(void)
|
||||||
*/
|
*/
|
||||||
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE;
|
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE;
|
||||||
RCC_OscInitStruct.HSEState = RCC_HSE_ON;
|
RCC_OscInitStruct.HSEState = RCC_HSE_ON;
|
||||||
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_NONE;
|
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
|
||||||
|
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;
|
||||||
|
RCC_OscInitStruct.PLL.PLLM = 6;
|
||||||
|
RCC_OscInitStruct.PLL.PLLN = 150;
|
||||||
|
RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2;
|
||||||
|
RCC_OscInitStruct.PLL.PLLQ = 4;
|
||||||
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
|
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
|
||||||
{
|
{
|
||||||
Error_Handler();
|
Error_Handler();
|
||||||
|
@ -174,12 +179,12 @@ void SystemClock_Config(void)
|
||||||
*/
|
*/
|
||||||
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
|
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
|
||||||
|RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2;
|
|RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2;
|
||||||
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_HSE;
|
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
|
||||||
RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
|
RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV2;
|
||||||
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;
|
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV2;
|
||||||
RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1;
|
RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1;
|
||||||
|
|
||||||
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_0) != HAL_OK)
|
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2) != HAL_OK)
|
||||||
{
|
{
|
||||||
Error_Handler();
|
Error_Handler();
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,9 +45,9 @@ void MX_TIM1_Init(void)
|
||||||
|
|
||||||
/* USER CODE END TIM1_Init 1 */
|
/* USER CODE END TIM1_Init 1 */
|
||||||
htim1.Instance = TIM1;
|
htim1.Instance = TIM1;
|
||||||
htim1.Init.Prescaler = 0;
|
htim1.Init.Prescaler = 2-1;
|
||||||
htim1.Init.CounterMode = TIM_COUNTERMODE_UP;
|
htim1.Init.CounterMode = TIM_COUNTERMODE_UP;
|
||||||
htim1.Init.Period = 11059-1;
|
htim1.Init.Period = 41472-1;
|
||||||
htim1.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
|
htim1.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
|
||||||
htim1.Init.RepetitionCounter = 0;
|
htim1.Init.RepetitionCounter = 0;
|
||||||
htim1.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_ENABLE;
|
htim1.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_ENABLE;
|
||||||
|
@ -165,9 +165,9 @@ void MX_TIM6_Init(void)
|
||||||
|
|
||||||
/* USER CODE END TIM6_Init 1 */
|
/* USER CODE END TIM6_Init 1 */
|
||||||
htim6.Instance = TIM6;
|
htim6.Instance = TIM6;
|
||||||
htim6.Init.Prescaler = 0;
|
htim6.Init.Prescaler = 2-1;
|
||||||
htim6.Init.CounterMode = TIM_COUNTERMODE_UP;
|
htim6.Init.CounterMode = TIM_COUNTERMODE_UP;
|
||||||
htim6.Init.Period = 11059-1;
|
htim6.Init.Period = 41472-1;
|
||||||
htim6.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_ENABLE;
|
htim6.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_ENABLE;
|
||||||
if (HAL_TIM_Base_Init(&htim6) != HAL_OK)
|
if (HAL_TIM_Base_Init(&htim6) != HAL_OK)
|
||||||
{
|
{
|
||||||
|
|
|
@ -113,6 +113,14 @@ void lv_port_disp_init(void)
|
||||||
disp_drv.hor_res = MY_DISP_HOR_RES;
|
disp_drv.hor_res = MY_DISP_HOR_RES;
|
||||||
disp_drv.ver_res = MY_DISP_VER_RES;
|
disp_drv.ver_res = MY_DISP_VER_RES;
|
||||||
|
|
||||||
|
/*Set rotation*/
|
||||||
|
disp_drv.sw_rotate = 1;
|
||||||
|
disp_drv.rotated = LV_DISP_ROT_90;
|
||||||
|
|
||||||
|
/*Set offset*/
|
||||||
|
disp_drv.offset_x = 0;
|
||||||
|
disp_drv.offset_y = 0;
|
||||||
|
|
||||||
/*Used to copy the buffer's content to the display*/
|
/*Used to copy the buffer's content to the display*/
|
||||||
disp_drv.flush_cb = disp_flush;
|
disp_drv.flush_cb = disp_flush;
|
||||||
|
|
||||||
|
|
|
@ -78,10 +78,10 @@
|
||||||
*====================*/
|
*====================*/
|
||||||
|
|
||||||
/*Default display refresh period. LVG will redraw changed areas with this period time*/
|
/*Default display refresh period. LVG will redraw changed areas with this period time*/
|
||||||
#define LV_DISP_DEF_REFR_PERIOD 30 /*[ms]*/
|
#define LV_DISP_DEF_REFR_PERIOD 15 /*[ms]*/
|
||||||
|
|
||||||
/*Input device read period in milliseconds*/
|
/*Input device read period in milliseconds*/
|
||||||
#define LV_INDEV_DEF_READ_PERIOD 30 /*[ms]*/
|
#define LV_INDEV_DEF_READ_PERIOD 15 /*[ms]*/
|
||||||
|
|
||||||
/*Use a custom tick source that tells the elapsed time in milliseconds.
|
/*Use a custom tick source that tells the elapsed time in milliseconds.
|
||||||
*It removes the need to manually update the tick with `lv_tick_inc()`)*/
|
*It removes the need to manually update the tick with `lv_tick_inc()`)*/
|
||||||
|
|
|
@ -16,24 +16,6 @@
|
||||||
#endif
|
#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)
|
void events_init(lv_ui *ui)
|
||||||
{
|
{
|
||||||
|
|
|
@ -18,7 +18,6 @@ extern "C" {
|
||||||
|
|
||||||
void events_init(lv_ui *ui);
|
void events_init(lv_ui *ui);
|
||||||
|
|
||||||
void events_init_screen(lv_ui *ui);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,11 @@
|
||||||
|
/*
|
||||||
|
* @Author: wujunchao wujunchao@wuxismart.com
|
||||||
|
* @Date: 2024-12-28 13:48:53
|
||||||
|
* @LastEditors: wujunchao wujunchao@wuxismart.com
|
||||||
|
* @LastEditTime: 2024-12-28 14:27:18
|
||||||
|
* @FilePath: \signal_generator\LVGL\myGUI\generated\gui_guider.c
|
||||||
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||||
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright 2024 NXP
|
* Copyright 2024 NXP
|
||||||
* NXP Proprietary. This software is owned or controlled by NXP and may only be used strictly in
|
* NXP Proprietary. This software is owned or controlled by NXP and may only be used strictly in
|
||||||
|
@ -73,12 +81,13 @@ void ui_animation(void * var, int32_t duration, int32_t delay, int32_t start_val
|
||||||
void init_scr_del_flag(lv_ui *ui)
|
void init_scr_del_flag(lv_ui *ui)
|
||||||
{
|
{
|
||||||
|
|
||||||
ui->screen_del = true;
|
ui->screen_init_del = true;
|
||||||
|
ui->screen_main_del = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void setup_ui(lv_ui *ui)
|
void setup_ui(lv_ui *ui)
|
||||||
{
|
{
|
||||||
init_scr_del_flag(ui);
|
init_scr_del_flag(ui);
|
||||||
setup_scr_screen(ui);
|
setup_scr_screen_init(ui);
|
||||||
lv_scr_load(ui->screen);
|
lv_scr_load(ui->screen_init);
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,11 +18,27 @@ extern "C" {
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
|
|
||||||
lv_obj_t *screen;
|
lv_obj_t *screen_init;
|
||||||
bool screen_del;
|
bool screen_init_del;
|
||||||
lv_obj_t *screen_bar_1;
|
lv_obj_t *screen_init_label_1;
|
||||||
lv_obj_t *screen_bar_2;
|
lv_obj_t *screen_init_bar_1;
|
||||||
lv_obj_t *screen_bar_3;
|
lv_obj_t *screen_main;
|
||||||
|
bool screen_main_del;
|
||||||
|
lv_obj_t *screen_main_menu_1;
|
||||||
|
lv_obj_t *screen_main_menu_1_sidebar_page;
|
||||||
|
lv_obj_t *screen_main_menu_1_subpage_1;
|
||||||
|
lv_obj_t *screen_main_menu_1_cont_1;
|
||||||
|
lv_obj_t *screen_main_menu_1_label_1;
|
||||||
|
lv_obj_t *screen_main_menu_1_subpage_2;
|
||||||
|
lv_obj_t *screen_main_menu_1_cont_2;
|
||||||
|
lv_obj_t *screen_main_menu_1_label_2;
|
||||||
|
lv_obj_t *screen_main_menu_1_subpage_3;
|
||||||
|
lv_obj_t *screen_main_menu_1_cont_3;
|
||||||
|
lv_obj_t *screen_main_menu_1_label_3;
|
||||||
|
lv_obj_t *screen_main_led_1;
|
||||||
|
lv_obj_t *screen_main_meter_1;
|
||||||
|
lv_meter_scale_t *screen_main_meter_1_scale_0;
|
||||||
|
lv_meter_indicator_t *screen_main_meter_1_scale_0_ndline_0;
|
||||||
}lv_ui;
|
}lv_ui;
|
||||||
|
|
||||||
typedef void (*ui_setup_scr_t)(lv_ui * ui);
|
typedef void (*ui_setup_scr_t)(lv_ui * ui);
|
||||||
|
@ -45,8 +61,12 @@ void setup_ui(lv_ui *ui);
|
||||||
extern lv_ui guider_ui;
|
extern lv_ui guider_ui;
|
||||||
|
|
||||||
|
|
||||||
void setup_scr_screen(lv_ui *ui);
|
void setup_scr_screen_init(lv_ui *ui);
|
||||||
|
void setup_scr_screen_main(lv_ui *ui);
|
||||||
|
|
||||||
|
LV_FONT_DECLARE(lv_font_montserratMedium_30)
|
||||||
|
LV_FONT_DECLARE(lv_font_montserratMedium_16)
|
||||||
|
LV_FONT_DECLARE(lv_font_montserratMedium_12)
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,105 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright 2024 NXP
|
|
||||||
* NXP Proprietary. This software is owned or controlled by NXP and may only be used strictly in
|
|
||||||
* accordance with the applicable license terms. By expressly accepting such terms or by downloading, installing,
|
|
||||||
* activating and/or otherwise using the software, you are agreeing that you have read, and that you agree to
|
|
||||||
* comply with and are bound by, such license terms. If you do not agree to be bound by the applicable license
|
|
||||||
* terms, then you may not retain, install, activate or otherwise use the software.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "lvgl.h"
|
|
||||||
#include <stdio.h>
|
|
||||||
#include "gui_guider.h"
|
|
||||||
#include "events_init.h"
|
|
||||||
#include "widgets_init.h"
|
|
||||||
#include "custom.h"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void setup_scr_screen(lv_ui *ui)
|
|
||||||
{
|
|
||||||
//Write codes screen
|
|
||||||
ui->screen = lv_obj_create(NULL);
|
|
||||||
lv_obj_set_size(ui->screen, 240, 320);
|
|
||||||
lv_obj_set_scrollbar_mode(ui->screen, LV_SCROLLBAR_MODE_OFF);
|
|
||||||
|
|
||||||
//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(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_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 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);
|
|
||||||
|
|
||||||
//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_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 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);
|
|
||||||
|
|
||||||
//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_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 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);
|
|
||||||
|
|
||||||
//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.
|
|
||||||
|
|
||||||
|
|
||||||
//Update current screen layout.
|
|
||||||
lv_obj_update_layout(ui->screen);
|
|
||||||
|
|
||||||
//Init events for screen.
|
|
||||||
events_init_screen(ui);
|
|
||||||
}
|
|
|
@ -0,0 +1,82 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2024 NXP
|
||||||
|
* NXP Proprietary. This software is owned or controlled by NXP and may only be used strictly in
|
||||||
|
* accordance with the applicable license terms. By expressly accepting such terms or by downloading, installing,
|
||||||
|
* activating and/or otherwise using the software, you are agreeing that you have read, and that you agree to
|
||||||
|
* comply with and are bound by, such license terms. If you do not agree to be bound by the applicable license
|
||||||
|
* terms, then you may not retain, install, activate or otherwise use the software.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "lvgl.h"
|
||||||
|
#include <stdio.h>
|
||||||
|
#include "gui_guider.h"
|
||||||
|
#include "events_init.h"
|
||||||
|
#include "widgets_init.h"
|
||||||
|
#include "custom.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void setup_scr_screen_init(lv_ui *ui)
|
||||||
|
{
|
||||||
|
//Write codes screen_init
|
||||||
|
ui->screen_init = lv_obj_create(NULL);
|
||||||
|
lv_obj_set_size(ui->screen_init, 320, 240);
|
||||||
|
lv_obj_set_scrollbar_mode(ui->screen_init, LV_SCROLLBAR_MODE_OFF);
|
||||||
|
|
||||||
|
//Write style for screen_init, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||||
|
lv_obj_set_style_bg_opa(ui->screen_init, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
|
lv_obj_set_style_bg_color(ui->screen_init, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
|
lv_obj_set_style_bg_grad_dir(ui->screen_init, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
|
|
||||||
|
//Write codes screen_init_label_1
|
||||||
|
ui->screen_init_label_1 = lv_label_create(ui->screen_init);
|
||||||
|
lv_label_set_text(ui->screen_init_label_1, "Welcome");
|
||||||
|
lv_label_set_long_mode(ui->screen_init_label_1, LV_LABEL_LONG_WRAP);
|
||||||
|
lv_obj_set_pos(ui->screen_init_label_1, 46, 78);
|
||||||
|
lv_obj_set_size(ui->screen_init_label_1, 228, 29);
|
||||||
|
|
||||||
|
//Write style for screen_init_label_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||||
|
lv_obj_set_style_border_width(ui->screen_init_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
|
lv_obj_set_style_radius(ui->screen_init_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
|
lv_obj_set_style_text_color(ui->screen_init_label_1, lv_color_hex(0x000000), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
|
lv_obj_set_style_text_font(ui->screen_init_label_1, &lv_font_montserratMedium_30, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
|
lv_obj_set_style_text_opa(ui->screen_init_label_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
|
lv_obj_set_style_text_letter_space(ui->screen_init_label_1, 2, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
|
lv_obj_set_style_text_line_space(ui->screen_init_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
|
lv_obj_set_style_text_align(ui->screen_init_label_1, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
|
lv_obj_set_style_bg_opa(ui->screen_init_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
|
lv_obj_set_style_pad_top(ui->screen_init_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
|
lv_obj_set_style_pad_right(ui->screen_init_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
|
lv_obj_set_style_pad_bottom(ui->screen_init_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
|
lv_obj_set_style_pad_left(ui->screen_init_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
|
lv_obj_set_style_shadow_width(ui->screen_init_label_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
|
|
||||||
|
//Write codes screen_init_bar_1
|
||||||
|
ui->screen_init_bar_1 = lv_bar_create(ui->screen_init);
|
||||||
|
lv_obj_set_style_anim_time(ui->screen_init_bar_1, 1000, 0);
|
||||||
|
lv_bar_set_mode(ui->screen_init_bar_1, LV_BAR_MODE_NORMAL);
|
||||||
|
lv_bar_set_range(ui->screen_init_bar_1, 0, 100);
|
||||||
|
lv_bar_set_value(ui->screen_init_bar_1, 0, LV_ANIM_OFF);
|
||||||
|
lv_obj_set_pos(ui->screen_init_bar_1, 87, 149);
|
||||||
|
lv_obj_set_size(ui->screen_init_bar_1, 145, 20);
|
||||||
|
|
||||||
|
//Write style for screen_init_bar_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||||
|
lv_obj_set_style_bg_opa(ui->screen_init_bar_1, 60, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
|
lv_obj_set_style_bg_color(ui->screen_init_bar_1, lv_color_hex(0x2195f6), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
|
lv_obj_set_style_bg_grad_dir(ui->screen_init_bar_1, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
|
lv_obj_set_style_radius(ui->screen_init_bar_1, 10, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
|
lv_obj_set_style_shadow_width(ui->screen_init_bar_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
|
|
||||||
|
//Write style for screen_init_bar_1, Part: LV_PART_INDICATOR, State: LV_STATE_DEFAULT.
|
||||||
|
lv_obj_set_style_bg_opa(ui->screen_init_bar_1, 255, LV_PART_INDICATOR|LV_STATE_DEFAULT);
|
||||||
|
lv_obj_set_style_bg_color(ui->screen_init_bar_1, lv_color_hex(0x2195f6), LV_PART_INDICATOR|LV_STATE_DEFAULT);
|
||||||
|
lv_obj_set_style_bg_grad_dir(ui->screen_init_bar_1, LV_GRAD_DIR_NONE, LV_PART_INDICATOR|LV_STATE_DEFAULT);
|
||||||
|
lv_obj_set_style_radius(ui->screen_init_bar_1, 10, LV_PART_INDICATOR|LV_STATE_DEFAULT);
|
||||||
|
|
||||||
|
//The custom code of screen_init.
|
||||||
|
|
||||||
|
|
||||||
|
//Update current screen layout.
|
||||||
|
lv_obj_update_layout(ui->screen_init);
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,189 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2024 NXP
|
||||||
|
* NXP Proprietary. This software is owned or controlled by NXP and may only be used strictly in
|
||||||
|
* accordance with the applicable license terms. By expressly accepting such terms or by downloading, installing,
|
||||||
|
* activating and/or otherwise using the software, you are agreeing that you have read, and that you agree to
|
||||||
|
* comply with and are bound by, such license terms. If you do not agree to be bound by the applicable license
|
||||||
|
* terms, then you may not retain, install, activate or otherwise use the software.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "lvgl.h"
|
||||||
|
#include <stdio.h>
|
||||||
|
#include "gui_guider.h"
|
||||||
|
#include "events_init.h"
|
||||||
|
#include "widgets_init.h"
|
||||||
|
#include "custom.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void setup_scr_screen_main(lv_ui *ui)
|
||||||
|
{
|
||||||
|
//Write codes screen_main
|
||||||
|
ui->screen_main = lv_obj_create(NULL);
|
||||||
|
lv_obj_set_size(ui->screen_main, 320, 240);
|
||||||
|
lv_obj_set_scrollbar_mode(ui->screen_main, LV_SCROLLBAR_MODE_OFF);
|
||||||
|
|
||||||
|
//Write style for screen_main, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||||
|
lv_obj_set_style_bg_opa(ui->screen_main, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
|
|
||||||
|
//Write codes screen_main_menu_1
|
||||||
|
ui->screen_main_menu_1 = lv_menu_create(ui->screen_main);
|
||||||
|
|
||||||
|
//Create sidebar page for menu screen_main_menu_1
|
||||||
|
ui->screen_main_menu_1_sidebar_page = lv_menu_page_create(ui->screen_main_menu_1, "GSDT");
|
||||||
|
lv_menu_set_sidebar_page(ui->screen_main_menu_1, ui->screen_main_menu_1_sidebar_page);
|
||||||
|
lv_obj_set_scrollbar_mode(ui->screen_main_menu_1_sidebar_page, LV_SCROLLBAR_MODE_OFF);
|
||||||
|
|
||||||
|
//Create subpage for screen_main_menu_1
|
||||||
|
ui->screen_main_menu_1_subpage_1 = lv_menu_page_create(ui->screen_main_menu_1, NULL);
|
||||||
|
ui->screen_main_menu_1_cont_1 = lv_menu_cont_create(ui->screen_main_menu_1_sidebar_page);
|
||||||
|
ui->screen_main_menu_1_label_1 = lv_label_create(ui->screen_main_menu_1_cont_1);
|
||||||
|
lv_label_set_text(ui->screen_main_menu_1_label_1, "sig output");
|
||||||
|
lv_obj_set_size(ui->screen_main_menu_1_label_1, LV_PCT(100), LV_SIZE_CONTENT);
|
||||||
|
lv_obj_set_scrollbar_mode(ui->screen_main_menu_1_subpage_1, LV_SCROLLBAR_MODE_OFF);
|
||||||
|
lv_menu_set_load_page_event(ui->screen_main_menu_1, ui->screen_main_menu_1_cont_1, ui->screen_main_menu_1_subpage_1);
|
||||||
|
|
||||||
|
//Create subpage for screen_main_menu_1
|
||||||
|
ui->screen_main_menu_1_subpage_2 = lv_menu_page_create(ui->screen_main_menu_1, NULL);
|
||||||
|
ui->screen_main_menu_1_cont_2 = lv_menu_cont_create(ui->screen_main_menu_1_sidebar_page);
|
||||||
|
ui->screen_main_menu_1_label_2 = lv_label_create(ui->screen_main_menu_1_cont_2);
|
||||||
|
lv_label_set_text(ui->screen_main_menu_1_label_2, "sig input");
|
||||||
|
lv_obj_set_size(ui->screen_main_menu_1_label_2, LV_PCT(100), LV_SIZE_CONTENT);
|
||||||
|
lv_obj_set_scrollbar_mode(ui->screen_main_menu_1_subpage_2, LV_SCROLLBAR_MODE_OFF);
|
||||||
|
lv_menu_set_load_page_event(ui->screen_main_menu_1, ui->screen_main_menu_1_cont_2, ui->screen_main_menu_1_subpage_2);
|
||||||
|
|
||||||
|
//Create subpage for screen_main_menu_1
|
||||||
|
ui->screen_main_menu_1_subpage_3 = lv_menu_page_create(ui->screen_main_menu_1, NULL);
|
||||||
|
ui->screen_main_menu_1_cont_3 = lv_menu_cont_create(ui->screen_main_menu_1_sidebar_page);
|
||||||
|
ui->screen_main_menu_1_label_3 = lv_label_create(ui->screen_main_menu_1_cont_3);
|
||||||
|
lv_label_set_text(ui->screen_main_menu_1_label_3, "Realtime");
|
||||||
|
lv_obj_set_size(ui->screen_main_menu_1_label_3, LV_PCT(100), LV_SIZE_CONTENT);
|
||||||
|
lv_obj_set_scrollbar_mode(ui->screen_main_menu_1_subpage_3, LV_SCROLLBAR_MODE_OFF);
|
||||||
|
lv_menu_set_load_page_event(ui->screen_main_menu_1, ui->screen_main_menu_1_cont_3, ui->screen_main_menu_1_subpage_3);
|
||||||
|
lv_event_send(ui->screen_main_menu_1_cont_1, LV_EVENT_CLICKED, NULL);
|
||||||
|
lv_obj_set_pos(ui->screen_main_menu_1, 0, 0);
|
||||||
|
lv_obj_set_size(ui->screen_main_menu_1, 320, 240);
|
||||||
|
lv_obj_set_scrollbar_mode(ui->screen_main_menu_1, LV_SCROLLBAR_MODE_OFF);
|
||||||
|
|
||||||
|
//Write style for screen_main_menu_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||||
|
lv_obj_set_style_bg_opa(ui->screen_main_menu_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
|
lv_obj_set_style_bg_color(ui->screen_main_menu_1, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
|
lv_obj_set_style_bg_grad_dir(ui->screen_main_menu_1, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
|
lv_obj_set_style_radius(ui->screen_main_menu_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
|
lv_obj_set_style_shadow_width(ui->screen_main_menu_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
|
|
||||||
|
//Write style state: LV_STATE_DEFAULT for &style_screen_main_menu_1_extra_sidebar_page_main_default
|
||||||
|
static lv_style_t style_screen_main_menu_1_extra_sidebar_page_main_default;
|
||||||
|
ui_init_style(&style_screen_main_menu_1_extra_sidebar_page_main_default);
|
||||||
|
|
||||||
|
lv_style_set_bg_opa(&style_screen_main_menu_1_extra_sidebar_page_main_default, 255);
|
||||||
|
lv_style_set_bg_color(&style_screen_main_menu_1_extra_sidebar_page_main_default, lv_color_hex(0xdaf2f8));
|
||||||
|
lv_style_set_bg_grad_dir(&style_screen_main_menu_1_extra_sidebar_page_main_default, LV_GRAD_DIR_NONE);
|
||||||
|
lv_style_set_radius(&style_screen_main_menu_1_extra_sidebar_page_main_default, 0);
|
||||||
|
lv_obj_add_style(ui->screen_main_menu_1_sidebar_page, &style_screen_main_menu_1_extra_sidebar_page_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
|
|
||||||
|
//Write style state: LV_STATE_DEFAULT for &style_screen_main_menu_1_extra_option_btns_main_default
|
||||||
|
static lv_style_t style_screen_main_menu_1_extra_option_btns_main_default;
|
||||||
|
ui_init_style(&style_screen_main_menu_1_extra_option_btns_main_default);
|
||||||
|
|
||||||
|
lv_style_set_text_color(&style_screen_main_menu_1_extra_option_btns_main_default, lv_color_hex(0x151212));
|
||||||
|
lv_style_set_text_font(&style_screen_main_menu_1_extra_option_btns_main_default, &lv_font_montserratMedium_12);
|
||||||
|
lv_style_set_text_opa(&style_screen_main_menu_1_extra_option_btns_main_default, 255);
|
||||||
|
lv_style_set_text_align(&style_screen_main_menu_1_extra_option_btns_main_default, LV_TEXT_ALIGN_CENTER);
|
||||||
|
lv_style_set_pad_top(&style_screen_main_menu_1_extra_option_btns_main_default, 10);
|
||||||
|
lv_style_set_pad_bottom(&style_screen_main_menu_1_extra_option_btns_main_default, 10);
|
||||||
|
lv_obj_add_style(ui->screen_main_menu_1_cont_3, &style_screen_main_menu_1_extra_option_btns_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
|
lv_obj_add_style(ui->screen_main_menu_1_cont_2, &style_screen_main_menu_1_extra_option_btns_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
|
lv_obj_add_style(ui->screen_main_menu_1_cont_1, &style_screen_main_menu_1_extra_option_btns_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
|
|
||||||
|
//Write style state: LV_STATE_CHECKED for &style_screen_main_menu_1_extra_option_btns_main_checked
|
||||||
|
static lv_style_t style_screen_main_menu_1_extra_option_btns_main_checked;
|
||||||
|
ui_init_style(&style_screen_main_menu_1_extra_option_btns_main_checked);
|
||||||
|
|
||||||
|
lv_style_set_text_color(&style_screen_main_menu_1_extra_option_btns_main_checked, lv_color_hex(0x9ab700));
|
||||||
|
lv_style_set_text_font(&style_screen_main_menu_1_extra_option_btns_main_checked, &lv_font_montserratMedium_12);
|
||||||
|
lv_style_set_text_opa(&style_screen_main_menu_1_extra_option_btns_main_checked, 255);
|
||||||
|
lv_style_set_text_align(&style_screen_main_menu_1_extra_option_btns_main_checked, LV_TEXT_ALIGN_CENTER);
|
||||||
|
lv_style_set_border_width(&style_screen_main_menu_1_extra_option_btns_main_checked, 0);
|
||||||
|
lv_style_set_radius(&style_screen_main_menu_1_extra_option_btns_main_checked, 0);
|
||||||
|
lv_style_set_bg_opa(&style_screen_main_menu_1_extra_option_btns_main_checked, 60);
|
||||||
|
lv_style_set_bg_color(&style_screen_main_menu_1_extra_option_btns_main_checked, lv_color_hex(0x00e0b8));
|
||||||
|
lv_style_set_bg_grad_dir(&style_screen_main_menu_1_extra_option_btns_main_checked, LV_GRAD_DIR_NONE);
|
||||||
|
lv_obj_add_style(ui->screen_main_menu_1_cont_3, &style_screen_main_menu_1_extra_option_btns_main_checked, LV_PART_MAIN|LV_STATE_CHECKED);
|
||||||
|
lv_obj_add_style(ui->screen_main_menu_1_cont_2, &style_screen_main_menu_1_extra_option_btns_main_checked, LV_PART_MAIN|LV_STATE_CHECKED);
|
||||||
|
lv_obj_add_style(ui->screen_main_menu_1_cont_1, &style_screen_main_menu_1_extra_option_btns_main_checked, LV_PART_MAIN|LV_STATE_CHECKED);
|
||||||
|
|
||||||
|
//Write style state: LV_STATE_DEFAULT for &style_screen_main_menu_1_extra_main_title_main_default
|
||||||
|
static lv_style_t style_screen_main_menu_1_extra_main_title_main_default;
|
||||||
|
ui_init_style(&style_screen_main_menu_1_extra_main_title_main_default);
|
||||||
|
|
||||||
|
lv_style_set_text_color(&style_screen_main_menu_1_extra_main_title_main_default, lv_color_hex(0x41485a));
|
||||||
|
lv_style_set_text_font(&style_screen_main_menu_1_extra_main_title_main_default, &lv_font_montserratMedium_12);
|
||||||
|
lv_style_set_text_opa(&style_screen_main_menu_1_extra_main_title_main_default, 255);
|
||||||
|
lv_style_set_text_align(&style_screen_main_menu_1_extra_main_title_main_default, LV_TEXT_ALIGN_CENTER);
|
||||||
|
lv_style_set_bg_opa(&style_screen_main_menu_1_extra_main_title_main_default, 255);
|
||||||
|
lv_style_set_bg_color(&style_screen_main_menu_1_extra_main_title_main_default, lv_color_hex(0xffffff));
|
||||||
|
lv_style_set_bg_grad_dir(&style_screen_main_menu_1_extra_main_title_main_default, LV_GRAD_DIR_NONE);
|
||||||
|
lv_style_set_pad_top(&style_screen_main_menu_1_extra_main_title_main_default, 0);
|
||||||
|
lv_style_set_pad_bottom(&style_screen_main_menu_1_extra_main_title_main_default, 0);
|
||||||
|
lv_menu_t * screen_main_menu_1_menu= (lv_menu_t *)ui->screen_main_menu_1;
|
||||||
|
lv_obj_t * screen_main_menu_1_title = screen_main_menu_1_menu->sidebar_header_title;
|
||||||
|
lv_obj_set_size(screen_main_menu_1_title, LV_PCT(100), LV_SIZE_CONTENT);
|
||||||
|
lv_obj_add_style(lv_menu_get_sidebar_header(ui->screen_main_menu_1), &style_screen_main_menu_1_extra_main_title_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//Write codes screen_main_led_1
|
||||||
|
ui->screen_main_led_1 = lv_led_create(ui->screen_main);
|
||||||
|
lv_led_set_brightness(ui->screen_main_led_1, 255);
|
||||||
|
lv_led_set_color(ui->screen_main_led_1, lv_color_hex(0x00a1b5));
|
||||||
|
lv_obj_set_pos(ui->screen_main_led_1, 29, 171);
|
||||||
|
lv_obj_set_size(ui->screen_main_led_1, 40, 40);
|
||||||
|
|
||||||
|
//Write codes screen_main_meter_1
|
||||||
|
ui->screen_main_meter_1 = lv_meter_create(ui->screen_main);
|
||||||
|
// add scale ui->screen_main_meter_1_scale_0
|
||||||
|
ui->screen_main_meter_1_scale_0 = lv_meter_add_scale(ui->screen_main_meter_1);
|
||||||
|
lv_meter_set_scale_ticks(ui->screen_main_meter_1, ui->screen_main_meter_1_scale_0, 41, 2, 10, lv_color_hex(0xff0000));
|
||||||
|
lv_meter_set_scale_major_ticks(ui->screen_main_meter_1, ui->screen_main_meter_1_scale_0, 8, 5, 15, lv_color_hex(0xffff00), 10);
|
||||||
|
lv_meter_set_scale_range(ui->screen_main_meter_1, ui->screen_main_meter_1_scale_0, 0, 100, 240, 150);
|
||||||
|
|
||||||
|
// add needle line for ui->screen_main_meter_1_scale_0.
|
||||||
|
ui->screen_main_meter_1_scale_0_ndline_0 = lv_meter_add_needle_line(ui->screen_main_meter_1, ui->screen_main_meter_1_scale_0, 5, lv_color_hex(0x000000), -10);
|
||||||
|
lv_meter_set_indicator_value(ui->screen_main_meter_1, ui->screen_main_meter_1_scale_0_ndline_0, 0);
|
||||||
|
lv_obj_set_pos(ui->screen_main_meter_1, 109, 19);
|
||||||
|
lv_obj_set_size(ui->screen_main_meter_1, 200, 200);
|
||||||
|
|
||||||
|
//Write style for screen_main_meter_1, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
|
||||||
|
lv_obj_set_style_bg_opa(ui->screen_main_meter_1, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
|
lv_obj_set_style_bg_color(ui->screen_main_meter_1, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
|
lv_obj_set_style_bg_grad_dir(ui->screen_main_meter_1, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
|
lv_obj_set_style_radius(ui->screen_main_meter_1, 100, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
|
lv_obj_set_style_border_width(ui->screen_main_meter_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
|
lv_obj_set_style_pad_top(ui->screen_main_meter_1, 14, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
|
lv_obj_set_style_pad_bottom(ui->screen_main_meter_1, 14, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
|
lv_obj_set_style_pad_left(ui->screen_main_meter_1, 14, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
|
lv_obj_set_style_pad_right(ui->screen_main_meter_1, 14, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
|
lv_obj_set_style_shadow_width(ui->screen_main_meter_1, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
|
||||||
|
|
||||||
|
//Write style for screen_main_meter_1, Part: LV_PART_TICKS, State: LV_STATE_DEFAULT.
|
||||||
|
lv_obj_set_style_text_color(ui->screen_main_meter_1, lv_color_hex(0xff0000), LV_PART_TICKS|LV_STATE_DEFAULT);
|
||||||
|
lv_obj_set_style_text_font(ui->screen_main_meter_1, &lv_font_montserratMedium_12, LV_PART_TICKS|LV_STATE_DEFAULT);
|
||||||
|
lv_obj_set_style_text_opa(ui->screen_main_meter_1, 255, LV_PART_TICKS|LV_STATE_DEFAULT);
|
||||||
|
|
||||||
|
//Write style for screen_main_meter_1, Part: LV_PART_INDICATOR, State: LV_STATE_DEFAULT.
|
||||||
|
lv_obj_set_style_bg_opa(ui->screen_main_meter_1, 255, LV_PART_INDICATOR|LV_STATE_DEFAULT);
|
||||||
|
lv_obj_set_style_bg_color(ui->screen_main_meter_1, lv_color_hex(0x000000), LV_PART_INDICATOR|LV_STATE_DEFAULT);
|
||||||
|
lv_obj_set_style_bg_grad_dir(ui->screen_main_meter_1, LV_GRAD_DIR_NONE, LV_PART_INDICATOR|LV_STATE_DEFAULT);
|
||||||
|
|
||||||
|
//The custom code of screen_main.
|
||||||
|
|
||||||
|
|
||||||
|
//Update current screen layout.
|
||||||
|
lv_obj_update_layout(ui->screen_main);
|
||||||
|
|
||||||
|
}
|
227024
MDK-ARM/JLinkLog.txt
227024
MDK-ARM/JLinkLog.txt
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
|
@ -82,7 +82,7 @@
|
||||||
</BeforeMake>
|
</BeforeMake>
|
||||||
<AfterMake>
|
<AfterMake>
|
||||||
<RunUserProg1>0</RunUserProg1>
|
<RunUserProg1>0</RunUserProg1>
|
||||||
<RunUserProg2>1</RunUserProg2>
|
<RunUserProg2>0</RunUserProg2>
|
||||||
<UserProg1Name></UserProg1Name>
|
<UserProg1Name></UserProg1Name>
|
||||||
<UserProg2Name></UserProg2Name>
|
<UserProg2Name></UserProg2Name>
|
||||||
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
|
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
|
||||||
|
@ -315,8 +315,8 @@
|
||||||
</ArmAdsMisc>
|
</ArmAdsMisc>
|
||||||
<Cads>
|
<Cads>
|
||||||
<interw>1</interw>
|
<interw>1</interw>
|
||||||
<Optim>1</Optim>
|
<Optim>3</Optim>
|
||||||
<oTime>0</oTime>
|
<oTime>1</oTime>
|
||||||
<SplitLS>0</SplitLS>
|
<SplitLS>0</SplitLS>
|
||||||
<OneElfS>1</OneElfS>
|
<OneElfS>1</OneElfS>
|
||||||
<Strict>0</Strict>
|
<Strict>0</Strict>
|
||||||
|
@ -1495,9 +1495,14 @@
|
||||||
<FilePath>..\LVGL\myGUI\generated\gui_guider.h</FilePath>
|
<FilePath>..\LVGL\myGUI\generated\gui_guider.h</FilePath>
|
||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<FileName>setup_scr_screen.c</FileName>
|
<FileName>setup_scr_screen_init.c</FileName>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<FilePath>..\LVGL\myGUI\generated\setup_scr_screen.c</FilePath>
|
<FilePath>..\LVGL\myGUI\generated\setup_scr_screen_init.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>setup_scr_screen_main.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\LVGL\myGUI\generated\setup_scr_screen_main.c</FilePath>
|
||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<FileName>widgets_init.c</FileName>
|
<FileName>widgets_init.c</FileName>
|
||||||
|
@ -1510,14 +1515,19 @@
|
||||||
<FilePath>..\LVGL\myGUI\generated\widgets_init.h</FilePath>
|
<FilePath>..\LVGL\myGUI\generated\widgets_init.h</FilePath>
|
||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<FileName>guider_customer_fonts.h</FileName>
|
<FileName>lv_font_montserratMedium_12.c</FileName>
|
||||||
<FileType>5</FileType>
|
<FileType>1</FileType>
|
||||||
<FilePath>..\LVGL\myGUI\generated\guider_customer_fonts\guider_customer_fonts.h</FilePath>
|
<FilePath>..\LVGL\myGUI\generated\guider_fonts\lv_font_montserratMedium_12.c</FilePath>
|
||||||
</File>
|
</File>
|
||||||
<File>
|
<File>
|
||||||
<FileName>lv_font_montserratMedium_18.c</FileName>
|
<FileName>lv_font_montserratMedium_16.c</FileName>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<FilePath>..\LVGL\myGUI\generated\guider_fonts\lv_font_montserratMedium_18.c</FilePath>
|
<FilePath>..\LVGL\myGUI\generated\guider_fonts\lv_font_montserratMedium_16.c</FilePath>
|
||||||
|
</File>
|
||||||
|
<File>
|
||||||
|
<FileName>lv_font_montserratMedium_30.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\LVGL\myGUI\generated\guider_fonts\lv_font_montserratMedium_30.c</FilePath>
|
||||||
</File>
|
</File>
|
||||||
</Files>
|
</Files>
|
||||||
</Group>
|
</Group>
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -53,6 +53,15 @@ signal_generator\apps_gather.o: ../App/BLE/ble.h
|
||||||
signal_generator\apps_gather.o: ../App/HART/hart.h
|
signal_generator\apps_gather.o: ../App/HART/hart.h
|
||||||
signal_generator\apps_gather.o: ../App/RN7302/rn7302.h
|
signal_generator\apps_gather.o: ../App/RN7302/rn7302.h
|
||||||
signal_generator\apps_gather.o: ../App/SIG24130/SIG24130.h
|
signal_generator\apps_gather.o: ../App/SIG24130/SIG24130.h
|
||||||
|
signal_generator\apps_gather.o: ../Middlewares/Third_Party/FreeRTOS/Source/include/FreeRTOS.h
|
||||||
|
signal_generator\apps_gather.o: ../Core/Inc/FreeRTOSConfig.h
|
||||||
|
signal_generator\apps_gather.o: ../Middlewares/Third_Party/FreeRTOS/Source/include/projdefs.h
|
||||||
|
signal_generator\apps_gather.o: ../Middlewares/Third_Party/FreeRTOS/Source/include/portable.h
|
||||||
|
signal_generator\apps_gather.o: ../Middlewares/Third_Party/FreeRTOS/Source/include/deprecated_definitions.h
|
||||||
|
signal_generator\apps_gather.o: ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F/portmacro.h
|
||||||
|
signal_generator\apps_gather.o: ../Middlewares/Third_Party/FreeRTOS/Source/include/mpu_wrappers.h
|
||||||
|
signal_generator\apps_gather.o: ../Middlewares/Third_Party/FreeRTOS/Source/include/task.h
|
||||||
|
signal_generator\apps_gather.o: ../Middlewares/Third_Party/FreeRTOS/Source/include/list.h
|
||||||
signal_generator\apps_gather.o: ../LVGL/lvgl.h
|
signal_generator\apps_gather.o: ../LVGL/lvgl.h
|
||||||
signal_generator\apps_gather.o: ../LVGL/src/misc/lv_log.h
|
signal_generator\apps_gather.o: ../LVGL/src/misc/lv_log.h
|
||||||
signal_generator\apps_gather.o: ../LVGL/src/misc/../lv_conf_internal.h
|
signal_generator\apps_gather.o: ../LVGL/src/misc/../lv_conf_internal.h
|
||||||
|
|
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.
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.
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
Loading…
Reference in New Issue