update:V1.3

1.修复实时报警索引错误
2.修复历史报警消息跨扇区显示错误
3.修复历史报警满一千条后会误擦除其他有效数据
4.修复TCP写入解析错误
This commit is contained in:
2026-05-19 15:29:07 +08:00
parent a736476c17
commit 786b29bb85
10 changed files with 260 additions and 89 deletions
+12 -6
View File
@@ -68,6 +68,8 @@ static void gui_tjc_hmi_all_page_index_clear(void);
static u8 hmi_tx_buffer[HMI_TX_BUFFER_NUM];
/*字符发送拼接 缓冲区*/
static char gui_tjc_hmi_text_buffer[GUI_TJC_HMI_TEXT_BUFFER_NUM];
/*设备缓冲区*/
app_leakage_sub_device_flash_data_t temp_buffer[APP_LEAKAGE_SUB_DEVICE_NUM];
/*字符名称 端口号*/
static char *hmi_proto_string_com[] =
{
@@ -149,10 +151,7 @@ static void gui_tjc_hmi_save_password_to_w25q(void)
/* 将设备信息从app_leakage保存到W25Q32 */
static void gui_tjc_hmi_save_device_info_to_w25q(void)
{
/* 创建一个临时缓冲区 */
app_leakage_sub_device_flash_data_t temp_buffer[APP_LEAKAGE_SUB_DEVICE_NUM];
{
/* 从app_leakage结构体复制到临时缓冲区 */
for(int i = 0; i < APP_LEAKAGE_SUB_DEVICE_NUM; i++)
{
@@ -306,7 +305,7 @@ static void gui_tjc_hmi_main_send(u8 cmd,u8 opa,u8 *p_data)
}
len += 3;
/*软件版本号*/
len += gui_tjc_hmi_tx_text_display(GUI_MAIN,0,2,(char *)&hmi_tx_buffer[len],
len += gui_tjc_hmi_tx_text_display(GUI_MAIN,0,3,(char *)&hmi_tx_buffer[len],
"%s",SwVersion);
if(HMI_PROTO_CMD_GET == cmd)/*获取数据*/
@@ -521,6 +520,13 @@ static void gui_tjc_hmi_curr_alarm_send(u8 cmd,u8 opa,u8 *p_data)
{
page_num++;
}
if (page_num == 0) {
page_num = 1;
}
if (p_tjc_hmi->page.real_alarm_index >= page_num) {
p_tjc_hmi->page.real_alarm_index = page_num - 1;
}
len += gui_tjc_hmi_tx_text_display(GUI_CURR_ALARM,0, 0,
(char *)&hmi_tx_buffer[len],
"%d/%d",
@@ -1221,7 +1227,7 @@ static void gui_tjc_hmi_history_alarm_send(u8 cmd,u8 opa,u8 *p_data)
#define HISTORY_ALARM_PER_PAGE (15) /* 每页15条历史报警数据 */
u16 len = 0, i, j;
u8 page_num, remain_records, display_count;
u32 total_records, start_index, record_index;
u32 total_records, start_index, record_index = 0;
app_leakage_history_alarm_t history_record;
char time_str[20];
char alarm_type_str[20];