信息修改,通讯,显示相关
This commit is contained in:
1 parent
c9633041ab
commit
ac7e06bbd2
15 files changed
+89
-47
No files matched your search
@@ -21,6 +21,7 @@
|
||||
#include <guider/generated/widgets_init.h>
|
||||
#include "lvgl.h"
|
||||
#include <ui_data_labels.h>
|
||||
#include "SC828_DATA_table.h"
|
||||
|
||||
#define DBG_TAG "gui"
|
||||
#define DBG_LVL DBG_LOG
|
||||
@@ -56,13 +57,26 @@ void setup_s_screen(lv_ui *ui)
|
||||
//工单
|
||||
lv_label_set_text(ui->screen_order, (const char *)Work);
|
||||
//水位
|
||||
snprintf(wter_str, sizeof(wter_str), "%04.0f", MTL);
|
||||
snprintf(wter_str, sizeof(wter_str), "%04.0f", MTL/10.0f);
|
||||
lv_label_set_text(ui->screen_water, (const char *)wter_str);
|
||||
//温度
|
||||
snprintf(temp_str, sizeof(temp_str), "%05.1f", MTT);
|
||||
snprintf(temp_str, sizeof(temp_str), "%05.1f", MTT/10.0f);
|
||||
lv_label_set_text(ui->screen_temp, (const char *)temp_str);
|
||||
|
||||
if(SCLINK_OK)//中央连接状态显示
|
||||
{
|
||||
lv_obj_clear_flag(ui->screen_inf_link, LV_OBJ_FLAG_HIDDEN);
|
||||
SCLINK_OK =0;
|
||||
}else{
|
||||
lv_obj_add_flag(ui->screen_inf_link, LV_OBJ_FLAG_HIDDEN);
|
||||
}
|
||||
|
||||
if(PLCLINK_OK)//plc连接状态显示
|
||||
{
|
||||
|
||||
}else{
|
||||
|
||||
}
|
||||
|
||||
update_led_i();
|
||||
update_led_o();
|
||||
|
||||
@@ -61,7 +61,7 @@ static lv_color_t *buf_3_2 = RT_NULL;
|
||||
/**********************
|
||||
* GLOBAL FUNCTIONS
|
||||
**********************/
|
||||
extern struct rt_memheap sdram_heap; //
|
||||
extern struct rt_memheap sdram_lcd; //
|
||||
void lv_port_disp_init(void)
|
||||
{
|
||||
/*-------------------------
|
||||
@@ -128,21 +128,21 @@ void lv_port_disp_init(void)
|
||||
|
||||
|
||||
// 使用对齐分配函数
|
||||
buf_1 = (lv_color_t *)rt_memheap_alloc_align(&sdram_heap,
|
||||
buf_1 = (lv_color_t *)rt_memheap_alloc_align(&sdram_lcd,
|
||||
sizeof(lv_color_t) * MY_DISP_HOR_RES * 10,
|
||||
4); // ← 关键:对齐到 4 字节
|
||||
|
||||
buf_2_1 = (lv_color_t *)rt_memheap_alloc_align(&sdram_heap,
|
||||
buf_2_1 = (lv_color_t *)rt_memheap_alloc_align(&sdram_lcd,
|
||||
sizeof(lv_color_t) * MY_DISP_HOR_RES * 10,
|
||||
4);
|
||||
buf_2_2 = (lv_color_t *)rt_memheap_alloc_align(&sdram_heap,
|
||||
buf_2_2 = (lv_color_t *)rt_memheap_alloc_align(&sdram_lcd,
|
||||
sizeof(lv_color_t) * MY_DISP_HOR_RES * 10,
|
||||
4);
|
||||
|
||||
buf_3_1 = (lv_color_t *)rt_memheap_alloc_align(&sdram_heap,
|
||||
buf_3_1 = (lv_color_t *)rt_memheap_alloc_align(&sdram_lcd,
|
||||
sizeof(lv_color_t) * MY_DISP_HOR_RES * MY_DISP_VER_RES,
|
||||
4);
|
||||
buf_3_2 = (lv_color_t *)rt_memheap_alloc_align(&sdram_heap,
|
||||
buf_3_2 = (lv_color_t *)rt_memheap_alloc_align(&sdram_lcd,
|
||||
sizeof(lv_color_t) * MY_DISP_HOR_RES * MY_DISP_VER_RES,
|
||||
4);
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include <guider/generated/widgets_init.h>
|
||||
#include "lvgl.h"
|
||||
#include <ui_data_labels.h>
|
||||
#include "libcsv.h"
|
||||
//#include "libcsv.h"
|
||||
|
||||
// 全局或静态数组
|
||||
char buf[8];
|
||||
|
||||
Reference in new issue
Block a user