update 解决相关bug
This commit is contained in:
@@ -39,6 +39,16 @@
|
||||
#define HMI_PROTO_GUI_HELP (0x17)/*<2A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
||||
#define HMI_PROTO_GUI_TIME (0x18)/*ʱ<><CAB1><EFBFBD><EFBFBD><EFBFBD>ý<EFBFBD><C3BD><EFBFBD>*/
|
||||
|
||||
/*<2A><><EFBFBD><EFBFBD>ID*/
|
||||
#define GUI_MAIN (10)/*<2A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*/
|
||||
#define GUI_CURR_ALARM (11)/*ʵʱ<CAB5><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*/
|
||||
#define GUI_DETALL_MAIN (12)/*<2A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>_<EFBFBD><5F>ϸ<EFBFBD><CFB8>Ϣ*/
|
||||
#define GUI_LOGIN (13)/*<2A><>½<EFBFBD><C2BD><EFBFBD><EFBFBD>*/
|
||||
#define GUI_HISTORY_ALARM (14)/*<2A><>ʷ<EFBFBD><CAB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*/
|
||||
#define GUI_TCP_CONFIG (15)/*<2A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ý<EFBFBD><C3BD><EFBFBD>*/
|
||||
#define GUI_DEVICE_CONFIG (16)/*<2A>豸<EFBFBD><E8B1B8><EFBFBD>ý<EFBFBD><C3BD><EFBFBD>*/
|
||||
#define GUI_TIME (18)/*ʱ<><CAB1><EFBFBD><EFBFBD><EFBFBD>ý<EFBFBD><C3BD><EFBFBD>*/
|
||||
|
||||
#define HMI_PROTO_ASCII_RX_DELINITER (0xAA)/*<2A><><EFBFBD>շָ<D5B7><D6B8><EFBFBD>*/
|
||||
|
||||
#define HMI_PROTO_ASCII_TX_DELINITER (0xFF)/*<2A><><EFBFBD>ͷָ<CDB7><D6B8><EFBFBD>*/
|
||||
@@ -125,7 +135,7 @@ static void gui_tjc_hmi_read_password_from_w25q(void)
|
||||
/*<2A><><EFBFBD><EFBFBD><EFBFBD>뱣<EFBFBD>浽W25Q32*/
|
||||
static void gui_tjc_hmi_save_password_to_w25q(void)
|
||||
{
|
||||
uint32_t erase_addr = W25Q32_PASSWORD_ADDR & ~(W25Q32_SECTOR_SIZE - 1);
|
||||
u32 erase_addr = W25Q32_PASSWORD_ADDR & ~(W25Q32_SECTOR_SIZE - 1);
|
||||
w25q32_sector_erase(erase_addr);
|
||||
/*<2A><>4<EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD><EFBFBD><EFBFBD>д<EFBFBD><D0B4>W25Q32*/
|
||||
w25q32.write(W25Q32_PASSWORD_ADDR, p_tjc_hmi->password, 4);
|
||||
@@ -144,7 +154,7 @@ static void gui_tjc_hmi_save_device_info_to_w25q(void)
|
||||
}
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD>Flash<73><68><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д<EFBFBD><D0B4> */
|
||||
uint32_t erase_addr = W25Q32_DEVICE_INFO_ADDR;
|
||||
u32 erase_addr = W25Q32_DEVICE_INFO_ADDR;
|
||||
|
||||
/* ȷ<><C8B7><EFBFBD><EFBFBD>ַ<EFBFBD><D6B7>4K<34><4B><EFBFBD>루W25Q32_SECTOR_SIZE = 4096<39><36> */
|
||||
erase_addr &= ~(W25Q32_SECTOR_SIZE - 1);
|
||||
@@ -158,6 +168,24 @@ static void gui_tjc_hmi_save_device_info_to_w25q(void)
|
||||
DEVICE_INFO_STORAGE_SIZE);
|
||||
}
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD>ǰW5500<30><30><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ñ<EFBFBD><C3B1>浽W25Q32 */
|
||||
static void gui_tjc_hmi_save_network_config_to_w25q(void)
|
||||
{
|
||||
network_config_t config;
|
||||
memcpy(config.ip, W5500.IP_Addr, 4);
|
||||
memcpy(config.mask, W5500.Sub_Mask, 4);
|
||||
memcpy(config.gateway, W5500.Gateway_IP, 4);
|
||||
config.port = (W5500.W5500_Class[0].ConfigData.Port[0] << 8) |
|
||||
W5500.W5500_Class[0].ConfigData.Port[1];
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>4K<34><4B><EFBFBD>룩 */
|
||||
u32 erase_addr = W25Q32_NETWORK_CONFIG_ADDR & ~(W25Q32_SECTOR_SIZE - 1);
|
||||
w25q32_sector_erase(erase_addr);
|
||||
|
||||
/* д<><D0B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
||||
w25q32.write(W25Q32_NETWORK_CONFIG_ADDR, (uint8_t*)&config, sizeof(config));
|
||||
}
|
||||
|
||||
/*<2A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>纯<EFBFBD><E7BAAF>*/
|
||||
static void parse_ip_string(u8 *str, u8 len, u8 *ip)
|
||||
{
|
||||
@@ -182,7 +210,7 @@ buffer
|
||||
format<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
...<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
*/
|
||||
static u16 gui_tjc_hmi_tx_text_display(u16 x,u16 y,char *buffer,const char *format,...)
|
||||
static u16 gui_tjc_hmi_tx_text_display(u16 z,u16 x,u16 y,char *buffer,const char *format,...)
|
||||
{
|
||||
u16 i,len;
|
||||
s16 state;
|
||||
@@ -202,7 +230,7 @@ static u16 gui_tjc_hmi_tx_text_display(u16 x,u16 y,char *buffer,const char *form
|
||||
}
|
||||
|
||||
/*ƴ<><C6B4><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD>*/
|
||||
sprintf(buffer,"t%d_%d.txt=\"%s\"",x,y,gui_tjc_hmi_text_buffer);
|
||||
sprintf(buffer,"t%d_%d_%d.txt=\"%s\"",z,x,y,gui_tjc_hmi_text_buffer);
|
||||
len = strlen(buffer);
|
||||
for(i=0;i<HMI_PROTO_ASCII_TX_DELINITER_NUM;i++)
|
||||
{
|
||||
@@ -240,10 +268,10 @@ static void gui_tjc_hmi_main_send(u8 cmd,u8 opa,u8 *p_data)
|
||||
DS1302.Time.Hour,
|
||||
DS1302.Time.Minute,
|
||||
DS1302.Time.Second);
|
||||
len += gui_tjc_hmi_tx_text_display(0,0,(char *)&hmi_tx_buffer[len],"%s",time);
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_MAIN,0,0,(char *)&hmi_tx_buffer[len],"%s",time);
|
||||
|
||||
/*IP<49><50>ַ*/
|
||||
len += gui_tjc_hmi_tx_text_display(0,1,(char *)&hmi_tx_buffer[len],
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_MAIN,0,1,(char *)&hmi_tx_buffer[len],
|
||||
"%d.%d.%d.%d",
|
||||
W5500.IP_Addr[0],
|
||||
W5500.IP_Addr[1],
|
||||
@@ -272,7 +300,7 @@ static void gui_tjc_hmi_main_send(u8 cmd,u8 opa,u8 *p_data)
|
||||
{
|
||||
for (y = 0; y < 5; y++)
|
||||
{
|
||||
len += gui_tjc_hmi_tx_text_display(j+1, y+1, (char *)&hmi_tx_buffer[len], "");
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_MAIN,j+1, y+1, (char *)&hmi_tx_buffer[len], "");
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -286,36 +314,36 @@ static void gui_tjc_hmi_main_send(u8 cmd,u8 opa,u8 *p_data)
|
||||
x = j;
|
||||
/*<2A><><EFBFBD><EFBFBD>*/
|
||||
y = 0;
|
||||
len += gui_tjc_hmi_tx_text_display(x+1,y+1,(char *)&hmi_tx_buffer[len],"%s",leakage.region_data[index].name);
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_MAIN,x+1,y+1,(char *)&hmi_tx_buffer[len],"%s",leakage.region_data[index].name);
|
||||
/*<2A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*/
|
||||
y = 1;
|
||||
len += gui_tjc_hmi_tx_text_display(x+1,y+1,(char *)&hmi_tx_buffer[len],"%d",leakage.region_data[index].sub_device_num);
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_MAIN,x+1,y+1,(char *)&hmi_tx_buffer[len],"%d",leakage.region_data[index].sub_device_num);
|
||||
/*©Һ<C2A9><D2BA><EFBFBD><EFBFBD>*/
|
||||
y = 2;
|
||||
if(leakage.region_data[index].leakage_num == 0)
|
||||
{
|
||||
len += gui_tjc_hmi_tx_text_display(x+1,y+1,(char *)&hmi_tx_buffer[len],"%s","Normal");
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_MAIN,x+1,y+1,(char *)&hmi_tx_buffer[len],"%s","Normal");
|
||||
}else
|
||||
{
|
||||
len += gui_tjc_hmi_tx_text_display(x+1,y+1,(char *)&hmi_tx_buffer[len],"%d",leakage.region_data[index].leakage_num);
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_MAIN,x+1,y+1,(char *)&hmi_tx_buffer[len],"%d",leakage.region_data[index].leakage_num);
|
||||
}
|
||||
/*<2A>ϴ<EFBFBD>*/
|
||||
y = 3;
|
||||
if(leakage.region_data[index].open_num == 0)
|
||||
{
|
||||
len += gui_tjc_hmi_tx_text_display(x+1,y+1,(char *)&hmi_tx_buffer[len],"%s","Normal");
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_MAIN,x+1,y+1,(char *)&hmi_tx_buffer[len],"%s","Normal");
|
||||
}else
|
||||
{
|
||||
len += gui_tjc_hmi_tx_text_display(x+1,y+1,(char *)&hmi_tx_buffer[len],"%d",leakage.region_data[index].open_num);
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_MAIN,x+1,y+1,(char *)&hmi_tx_buffer[len],"%d",leakage.region_data[index].open_num);
|
||||
}
|
||||
/*ͨѶ*/
|
||||
y = 4;
|
||||
if(leakage.region_data[index].time_out_num == 0)
|
||||
{
|
||||
len += gui_tjc_hmi_tx_text_display(x+1,y+1,(char *)&hmi_tx_buffer[len],"%s","Normal");
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_MAIN,x+1,y+1,(char *)&hmi_tx_buffer[len],"%s","Normal");
|
||||
}else
|
||||
{
|
||||
len += gui_tjc_hmi_tx_text_display(x+1,y+1,(char *)&hmi_tx_buffer[len],"%d",leakage.region_data[index].time_out_num);
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_MAIN,x+1,y+1,(char *)&hmi_tx_buffer[len],"%d",leakage.region_data[index].time_out_num);
|
||||
}
|
||||
}
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>е<EFBFBD><D0B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>У<EFBFBD><D0A3><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD>
|
||||
@@ -323,7 +351,7 @@ static void gui_tjc_hmi_main_send(u8 cmd,u8 opa,u8 *p_data)
|
||||
{
|
||||
for(y = 0; y < 5; y++) // <20><><EFBFBD><EFBFBD>5<EFBFBD><35><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
{
|
||||
len += gui_tjc_hmi_tx_text_display(j+1, y+1, (char *)&hmi_tx_buffer[len], "");
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_MAIN,j+1, y+1, (char *)&hmi_tx_buffer[len], "");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -335,36 +363,36 @@ static void gui_tjc_hmi_main_send(u8 cmd,u8 opa,u8 *p_data)
|
||||
x = j;
|
||||
/*<2A><><EFBFBD><EFBFBD>*/
|
||||
y = 0;
|
||||
len += gui_tjc_hmi_tx_text_display(x+1,y+1,(char *)&hmi_tx_buffer[len],"%s",leakage.region_data[index].name);
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_MAIN,x+1,y+1,(char *)&hmi_tx_buffer[len],"%s",leakage.region_data[index].name);
|
||||
/*<2A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*/
|
||||
y = 1;
|
||||
len += gui_tjc_hmi_tx_text_display(x+1,y+1,(char *)&hmi_tx_buffer[len],"%d",leakage.region_data[index].sub_device_num);
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_MAIN,x+1,y+1,(char *)&hmi_tx_buffer[len],"%d",leakage.region_data[index].sub_device_num);
|
||||
/*©Һ<C2A9><D2BA><EFBFBD><EFBFBD>*/
|
||||
y = 2;
|
||||
if(leakage.region_data[index].leakage_num == 0)
|
||||
{
|
||||
len += gui_tjc_hmi_tx_text_display(x+1,y+1,(char *)&hmi_tx_buffer[len],"%s","Normal");
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_MAIN,x+1,y+1,(char *)&hmi_tx_buffer[len],"%s","Normal");
|
||||
}else
|
||||
{
|
||||
len += gui_tjc_hmi_tx_text_display(x+1,y+1,(char *)&hmi_tx_buffer[len],"%d",leakage.region_data[index].leakage_num);
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_MAIN,x+1,y+1,(char *)&hmi_tx_buffer[len],"%d",leakage.region_data[index].leakage_num);
|
||||
}
|
||||
/*<2A>ϴ<EFBFBD>*/
|
||||
y = 3;
|
||||
if(leakage.region_data[index].open_num == 0)
|
||||
{
|
||||
len += gui_tjc_hmi_tx_text_display(x+1,y+1,(char *)&hmi_tx_buffer[len],"%s","Normal");
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_MAIN,x+1,y+1,(char *)&hmi_tx_buffer[len],"%s","Normal");
|
||||
}else
|
||||
{
|
||||
len += gui_tjc_hmi_tx_text_display(x+1,y+1,(char *)&hmi_tx_buffer[len],"%d",leakage.region_data[index].open_num);
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_MAIN,x+1,y+1,(char *)&hmi_tx_buffer[len],"%d",leakage.region_data[index].open_num);
|
||||
}
|
||||
/*ͨѶ*/
|
||||
y = 4;
|
||||
if(leakage.region_data[index].time_out_num == 0)
|
||||
{
|
||||
len += gui_tjc_hmi_tx_text_display(x+1,y+1,(char *)&hmi_tx_buffer[len],"%s","Normal");
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_MAIN,x+1,y+1,(char *)&hmi_tx_buffer[len],"%s","Normal");
|
||||
}else
|
||||
{
|
||||
len += gui_tjc_hmi_tx_text_display(x+1,y+1,(char *)&hmi_tx_buffer[len],"%d",leakage.region_data[index].time_out_num);
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_MAIN,x+1,y+1,(char *)&hmi_tx_buffer[len],"%d",leakage.region_data[index].time_out_num);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -445,7 +473,7 @@ static void gui_tjc_hmi_curr_alarm_send(u8 cmd,u8 opa,u8 *p_data)
|
||||
continue ;
|
||||
}
|
||||
|
||||
if(UNBLOCKED != leakage.sub_device_data[i].flash_data.shield)
|
||||
if(UNBLOCKED != leakage.sub_device_data[i].shield)
|
||||
{
|
||||
continue ;
|
||||
}
|
||||
@@ -492,15 +520,15 @@ static void gui_tjc_hmi_curr_alarm_send(u8 cmd,u8 opa,u8 *p_data)
|
||||
|
||||
/*<2A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*/
|
||||
y = 0;
|
||||
len += gui_tjc_hmi_tx_text_display(x+1,y+1,(char *)&hmi_tx_buffer[len],"%s",leakage.sub_device_data[device_index].flash_data.region_name);
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_CURR_ALARM,x+1,y+1,(char *)&hmi_tx_buffer[len],"%s",leakage.sub_device_data[device_index].flash_data.region_name);
|
||||
|
||||
/*<2A>豸ID*/
|
||||
y = 1;
|
||||
len += gui_tjc_hmi_tx_text_display(x+1,y+1,(char *)&hmi_tx_buffer[len],"%d",leakage.sub_device_data[device_index].flash_data.modbus_id);
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_CURR_ALARM,x+1,y+1,(char *)&hmi_tx_buffer[len],"%d",leakage.sub_device_data[device_index].flash_data.modbus_id);
|
||||
|
||||
/*<2A>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD>*/
|
||||
y = 2;
|
||||
len += gui_tjc_hmi_tx_text_display(x+1,y+1,(char *)&hmi_tx_buffer[len],"%s",leakage.sub_device_data[device_index].flash_data.device_name);
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_CURR_ALARM,x+1,y+1,(char *)&hmi_tx_buffer[len],"%s",leakage.sub_device_data[device_index].flash_data.device_name);
|
||||
|
||||
/*ͨѶ״̬*/
|
||||
y =3;
|
||||
@@ -515,10 +543,10 @@ static void gui_tjc_hmi_curr_alarm_send(u8 cmd,u8 opa,u8 *p_data)
|
||||
}
|
||||
if(comm_state & APP_LEAKAGE_SUB_DEVICE_STATE_TIME_OUT)
|
||||
{
|
||||
len += gui_tjc_hmi_tx_text_display(x+1,y+1,(char *)&hmi_tx_buffer[len],"<EFBFBD>쳣");
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_CURR_ALARM,x+1,y+1,(char *)&hmi_tx_buffer[len],"<EFBFBD>쳣");
|
||||
}else
|
||||
{
|
||||
len += gui_tjc_hmi_tx_text_display(x+1,y+1,(char *)&hmi_tx_buffer[len],"<EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_CURR_ALARM,x+1,y+1,(char *)&hmi_tx_buffer[len],"<EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
||||
}
|
||||
|
||||
/*ͨ<><CDA8>״̬*/
|
||||
@@ -530,28 +558,28 @@ static void gui_tjc_hmi_curr_alarm_send(u8 cmd,u8 opa,u8 *p_data)
|
||||
y = 4 + (ch * 3);
|
||||
if(ch_state & APP_LEAKAGE_SUB_DEVICE_STATE_LEAKAGE)
|
||||
{
|
||||
len += gui_tjc_hmi_tx_text_display(x+1,y+1,(char *)&hmi_tx_buffer[len],"©Һ");
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_CURR_ALARM,x+1,y+1,(char *)&hmi_tx_buffer[len],"©Һ");
|
||||
}else
|
||||
{
|
||||
len += gui_tjc_hmi_tx_text_display(x+1,y+1,(char *)&hmi_tx_buffer[len],"<EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_CURR_ALARM,x+1,y+1,(char *)&hmi_tx_buffer[len],"<EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
||||
}
|
||||
|
||||
y =5 + (ch * 3);
|
||||
if(ch_state & APP_LEAKAGE_SUB_DEVICE_STATE_OPEN)
|
||||
{
|
||||
len += gui_tjc_hmi_tx_text_display(x+1,y+1,(char *)&hmi_tx_buffer[len],"<EFBFBD>ϴ<EFBFBD>");
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_CURR_ALARM,x+1,y+1,(char *)&hmi_tx_buffer[len],"<EFBFBD>ϴ<EFBFBD>");
|
||||
}else
|
||||
{
|
||||
len += gui_tjc_hmi_tx_text_display(x+1,y+1,(char *)&hmi_tx_buffer[len],"<EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_CURR_ALARM,x+1,y+1,(char *)&hmi_tx_buffer[len],"<EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
||||
}
|
||||
|
||||
y = 6 + (ch * 3);
|
||||
if(ch_state & APP_LEAKAGE_SUB_DEVICE_STATE_LEAKAGE)
|
||||
{
|
||||
len += gui_tjc_hmi_tx_text_display(x+1,y+1,(char *)&hmi_tx_buffer[len],"%d",ch_distance);
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_CURR_ALARM,x+1,y+1,(char *)&hmi_tx_buffer[len],"%d",ch_distance);
|
||||
}else
|
||||
{
|
||||
len += gui_tjc_hmi_tx_text_display(x+1,y+1,(char *)&hmi_tx_buffer[len],"0");
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_CURR_ALARM,x+1,y+1,(char *)&hmi_tx_buffer[len],"0");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -567,15 +595,15 @@ static void gui_tjc_hmi_curr_alarm_send(u8 cmd,u8 opa,u8 *p_data)
|
||||
|
||||
/*<2A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*/
|
||||
y = 0;
|
||||
len += gui_tjc_hmi_tx_text_display(x+1,y+1,(char *)&hmi_tx_buffer[len],"%s",leakage.sub_device_data[device_index].flash_data.region_name);
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_CURR_ALARM,x+1,y+1,(char *)&hmi_tx_buffer[len],"%s",leakage.sub_device_data[device_index].flash_data.region_name);
|
||||
|
||||
/*<2A>豸ID*/
|
||||
y = 1;
|
||||
len += gui_tjc_hmi_tx_text_display(x+1,y+1,(char *)&hmi_tx_buffer[len],"%d",leakage.sub_device_data[device_index].flash_data.modbus_id);
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_CURR_ALARM,x+1,y+1,(char *)&hmi_tx_buffer[len],"%d",leakage.sub_device_data[device_index].flash_data.modbus_id);
|
||||
|
||||
/*<2A>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD>*/
|
||||
y = 2;
|
||||
len += gui_tjc_hmi_tx_text_display(x+1,y+1,(char *)&hmi_tx_buffer[len],"%s",leakage.sub_device_data[device_index].flash_data.device_name);
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_CURR_ALARM,x+1,y+1,(char *)&hmi_tx_buffer[len],"%s",leakage.sub_device_data[device_index].flash_data.device_name);
|
||||
|
||||
/*ͨѶ״̬*/
|
||||
y =3;
|
||||
@@ -590,10 +618,10 @@ static void gui_tjc_hmi_curr_alarm_send(u8 cmd,u8 opa,u8 *p_data)
|
||||
}
|
||||
if(comm_state & APP_LEAKAGE_SUB_DEVICE_STATE_TIME_OUT)
|
||||
{
|
||||
len += gui_tjc_hmi_tx_text_display(x+1,y+1,(char *)&hmi_tx_buffer[len],"<EFBFBD>쳣");
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_CURR_ALARM,x+1,y+1,(char *)&hmi_tx_buffer[len],"<EFBFBD>쳣");
|
||||
}else
|
||||
{
|
||||
len += gui_tjc_hmi_tx_text_display(x+1,y+1,(char *)&hmi_tx_buffer[len],"<EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_CURR_ALARM,x+1,y+1,(char *)&hmi_tx_buffer[len],"<EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
||||
}
|
||||
|
||||
/*ͨ<><CDA8>״̬*/
|
||||
@@ -605,28 +633,28 @@ static void gui_tjc_hmi_curr_alarm_send(u8 cmd,u8 opa,u8 *p_data)
|
||||
y = 4 + (ch * 3);
|
||||
if(ch_state & APP_LEAKAGE_SUB_DEVICE_STATE_LEAKAGE)
|
||||
{
|
||||
len += gui_tjc_hmi_tx_text_display(x+1,y+1,(char *)&hmi_tx_buffer[len],"©Һ");
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_CURR_ALARM,x+1,y+1,(char *)&hmi_tx_buffer[len],"©Һ");
|
||||
}else
|
||||
{
|
||||
len += gui_tjc_hmi_tx_text_display(x+1,y+1,(char *)&hmi_tx_buffer[len],"<EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_CURR_ALARM,x+1,y+1,(char *)&hmi_tx_buffer[len],"<EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
||||
}
|
||||
|
||||
y =5 + (ch * 3);
|
||||
if(ch_state & APP_LEAKAGE_SUB_DEVICE_STATE_OPEN)
|
||||
{
|
||||
len += gui_tjc_hmi_tx_text_display(x+1,y+1,(char *)&hmi_tx_buffer[len],"<EFBFBD>ϴ<EFBFBD>");
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_CURR_ALARM,x+1,y+1,(char *)&hmi_tx_buffer[len],"<EFBFBD>ϴ<EFBFBD>");
|
||||
}else
|
||||
{
|
||||
len += gui_tjc_hmi_tx_text_display(x+1,y+1,(char *)&hmi_tx_buffer[len],"<EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_CURR_ALARM,x+1,y+1,(char *)&hmi_tx_buffer[len],"<EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
||||
}
|
||||
|
||||
y = 6 + (ch * 3);
|
||||
if(ch_state & APP_LEAKAGE_SUB_DEVICE_STATE_LEAKAGE)
|
||||
{
|
||||
len += gui_tjc_hmi_tx_text_display(x+1,y+1,(char *)&hmi_tx_buffer[len],"%d",ch_distance);
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_CURR_ALARM,x+1,y+1,(char *)&hmi_tx_buffer[len],"%d",ch_distance);
|
||||
}else
|
||||
{
|
||||
len += gui_tjc_hmi_tx_text_display(x+1,y+1,(char *)&hmi_tx_buffer[len],"0");
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_CURR_ALARM,x+1,y+1,(char *)&hmi_tx_buffer[len],"0");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -634,15 +662,15 @@ static void gui_tjc_hmi_curr_alarm_send(u8 cmd,u8 opa,u8 *p_data)
|
||||
for (; j < REAL_ALARM_PAGE_NUM; j++)
|
||||
{
|
||||
x = j;
|
||||
len += gui_tjc_hmi_tx_text_display(x + 1, 1, (char *)&hmi_tx_buffer[len], ""); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
len += gui_tjc_hmi_tx_text_display(x + 1, 2, (char *)&hmi_tx_buffer[len], ""); // <20>豸ID
|
||||
len += gui_tjc_hmi_tx_text_display(x + 1, 3, (char *)&hmi_tx_buffer[len], ""); // <20>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD>
|
||||
len += gui_tjc_hmi_tx_text_display(x + 1, 4, (char *)&hmi_tx_buffer[len], ""); // ͨѶ״̬
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_CURR_ALARM,x + 1, 1, (char *)&hmi_tx_buffer[len], ""); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_CURR_ALARM,x + 1, 2, (char *)&hmi_tx_buffer[len], ""); // <20>豸ID
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_CURR_ALARM,x + 1, 3, (char *)&hmi_tx_buffer[len], ""); // <20>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD>
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_CURR_ALARM,x + 1, 4, (char *)&hmi_tx_buffer[len], ""); // ͨѶ״̬
|
||||
for (ch = 0; ch < APP_LEAKAGE_SUB_DEVICE_CH_NUM; ch++)
|
||||
{
|
||||
len += gui_tjc_hmi_tx_text_display(x + 1, 5 + (ch * 3), (char *)&hmi_tx_buffer[len], "");
|
||||
len += gui_tjc_hmi_tx_text_display(x + 1, 6 + (ch * 3), (char *)&hmi_tx_buffer[len], "");
|
||||
len += gui_tjc_hmi_tx_text_display(x + 1, 7 + (ch * 3), (char *)&hmi_tx_buffer[len], "");
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_CURR_ALARM,x + 1, 5 + (ch * 3), (char *)&hmi_tx_buffer[len], "");
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_CURR_ALARM,x + 1, 6 + (ch * 3), (char *)&hmi_tx_buffer[len], "");
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_CURR_ALARM,x + 1, 7 + (ch * 3), (char *)&hmi_tx_buffer[len], "");
|
||||
}
|
||||
}
|
||||
}break;
|
||||
@@ -757,14 +785,14 @@ static void gui_tjc_hmi_detail_main_send(u8 cmd, u8 opa, u8 *p_data)
|
||||
|
||||
/* <20>豸ID: t(x+1)_1 */
|
||||
y = 0;
|
||||
len += gui_tjc_hmi_tx_text_display(x+1, y+1,
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_DETALL_MAIN,x+1, y+1,
|
||||
(char *)&hmi_tx_buffer[len],
|
||||
"%d",
|
||||
leakage.sub_device_data[sub_device_index].flash_data.modbus_id);
|
||||
|
||||
/* <20>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD>: t(x+1)_2 */
|
||||
y = 1;
|
||||
len += gui_tjc_hmi_tx_text_display(x+1, y+1,
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_DETALL_MAIN,x+1, y+1,
|
||||
(char *)&hmi_tx_buffer[len],
|
||||
"%s",
|
||||
leakage.sub_device_data[sub_device_index].flash_data.device_name);
|
||||
@@ -781,23 +809,23 @@ static void gui_tjc_hmi_detail_main_send(u8 cmd, u8 opa, u8 *p_data)
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(leakage.sub_device_data[sub_device_index].flash_data.shield == UNBLOCKED)
|
||||
if(leakage.sub_device_data[sub_device_index].shield == UNBLOCKED)
|
||||
{
|
||||
if (comm_state)
|
||||
{
|
||||
len += gui_tjc_hmi_tx_text_display(x+1, y+1,
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_DETALL_MAIN,x+1, y+1,
|
||||
(char *)&hmi_tx_buffer[len],
|
||||
"<EFBFBD><EFBFBD>ʱ");
|
||||
}
|
||||
else
|
||||
{
|
||||
len += gui_tjc_hmi_tx_text_display(x+1, y+1,
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_DETALL_MAIN,x+1, y+1,
|
||||
(char *)&hmi_tx_buffer[len],
|
||||
"<EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
||||
}
|
||||
}else
|
||||
{
|
||||
len += gui_tjc_hmi_tx_text_display(x+1, y+1,
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_DETALL_MAIN,x+1, y+1,
|
||||
(char *)&hmi_tx_buffer[len],
|
||||
"<EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
||||
}
|
||||
@@ -811,23 +839,23 @@ static void gui_tjc_hmi_detail_main_send(u8 cmd, u8 opa, u8 *p_data)
|
||||
|
||||
/* ©Һ״̬ */
|
||||
y = 3 + (ch * 3);
|
||||
if(leakage.sub_device_data[sub_device_index].flash_data.shield == UNBLOCKED)
|
||||
if(leakage.sub_device_data[sub_device_index].shield == UNBLOCKED)
|
||||
{
|
||||
if (ch_state & APP_LEAKAGE_SUB_DEVICE_STATE_LEAKAGE)
|
||||
{
|
||||
len += gui_tjc_hmi_tx_text_display(x+1, y+1,
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_DETALL_MAIN,x+1, y+1,
|
||||
(char *)&hmi_tx_buffer[len],
|
||||
"©Һ");
|
||||
}
|
||||
else
|
||||
{
|
||||
len += gui_tjc_hmi_tx_text_display(x+1, y+1,
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_DETALL_MAIN,x+1, y+1,
|
||||
(char *)&hmi_tx_buffer[len],
|
||||
"<EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
||||
}
|
||||
}else
|
||||
{
|
||||
len += gui_tjc_hmi_tx_text_display(x+1, y+1,
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_DETALL_MAIN,x+1, y+1,
|
||||
(char *)&hmi_tx_buffer[len],
|
||||
"<EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
||||
}
|
||||
@@ -835,23 +863,23 @@ static void gui_tjc_hmi_detail_main_send(u8 cmd, u8 opa, u8 *p_data)
|
||||
|
||||
/* <20>ϴ<EFBFBD>״̬ */
|
||||
y = 4 + (ch * 3);
|
||||
if(leakage.sub_device_data[sub_device_index].flash_data.shield == UNBLOCKED)
|
||||
if(leakage.sub_device_data[sub_device_index].shield == UNBLOCKED)
|
||||
{
|
||||
if (ch_state & APP_LEAKAGE_SUB_DEVICE_STATE_OPEN)
|
||||
{
|
||||
len += gui_tjc_hmi_tx_text_display(x+1, y+1,
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_DETALL_MAIN,x+1, y+1,
|
||||
(char *)&hmi_tx_buffer[len],
|
||||
"<EFBFBD>ϴ<EFBFBD>");
|
||||
}
|
||||
else
|
||||
{
|
||||
len += gui_tjc_hmi_tx_text_display(x+1, y+1,
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_DETALL_MAIN,x+1, y+1,
|
||||
(char *)&hmi_tx_buffer[len],
|
||||
"<EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
||||
}
|
||||
}else
|
||||
{
|
||||
len += gui_tjc_hmi_tx_text_display(x+1, y+1,
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_DETALL_MAIN,x+1, y+1,
|
||||
(char *)&hmi_tx_buffer[len],
|
||||
"<EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
||||
}
|
||||
@@ -859,24 +887,24 @@ static void gui_tjc_hmi_detail_main_send(u8 cmd, u8 opa, u8 *p_data)
|
||||
|
||||
/* ©Һλ<D2BA><CEBB> */
|
||||
y = 5 + (ch * 3);
|
||||
if(leakage.sub_device_data[sub_device_index].flash_data.shield == UNBLOCKED)
|
||||
if(leakage.sub_device_data[sub_device_index].shield == UNBLOCKED)
|
||||
{
|
||||
if (ch_state & APP_LEAKAGE_SUB_DEVICE_STATE_LEAKAGE)
|
||||
{
|
||||
len += gui_tjc_hmi_tx_text_display(x+1, y+1,
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_DETALL_MAIN,x+1, y+1,
|
||||
(char *)&hmi_tx_buffer[len],
|
||||
"%d",
|
||||
ch_distance);
|
||||
}
|
||||
else
|
||||
{
|
||||
len += gui_tjc_hmi_tx_text_display(x+1, y+1,
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_DETALL_MAIN,x+1, y+1,
|
||||
(char *)&hmi_tx_buffer[len],
|
||||
"0");
|
||||
}
|
||||
}else
|
||||
{
|
||||
len += gui_tjc_hmi_tx_text_display(x+1, y+1,
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_DETALL_MAIN,x+1, y+1,
|
||||
(char *)&hmi_tx_buffer[len],
|
||||
"0");
|
||||
}
|
||||
@@ -884,13 +912,13 @@ static void gui_tjc_hmi_detail_main_send(u8 cmd, u8 opa, u8 *p_data)
|
||||
}
|
||||
/* <20><><EFBFBD><EFBFBD>״̬<D7B4><CCAC>ʾ: t(x+1)_16 */
|
||||
y = 15; // <20><>16<31>ж<EFBFBD>Ӧy=15
|
||||
if (leakage.sub_device_data[sub_device_index].flash_data.shield == BLOCKED)
|
||||
if (leakage.sub_device_data[sub_device_index].shield == BLOCKED)
|
||||
{
|
||||
len += gui_tjc_hmi_tx_text_display(x+1, y+1, (char *)&hmi_tx_buffer[len], "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_DETALL_MAIN,x+1, y+1, (char *)&hmi_tx_buffer[len], "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
||||
}
|
||||
else
|
||||
{
|
||||
len += gui_tjc_hmi_tx_text_display(x+1, y+1, (char *)&hmi_tx_buffer[len], "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_DETALL_MAIN,x+1, y+1, (char *)&hmi_tx_buffer[len], "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -898,16 +926,16 @@ static void gui_tjc_hmi_detail_main_send(u8 cmd, u8 opa, u8 *p_data)
|
||||
for (; i < DETAIL_MAIN_NUM; i++)
|
||||
{
|
||||
x = i;
|
||||
len += gui_tjc_hmi_tx_text_display(x+1, 1, (char *)&hmi_tx_buffer[len], "");
|
||||
len += gui_tjc_hmi_tx_text_display(x+1, 2, (char *)&hmi_tx_buffer[len], "");
|
||||
len += gui_tjc_hmi_tx_text_display(x+1, 3, (char *)&hmi_tx_buffer[len], "");
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_DETALL_MAIN,x+1, 1, (char *)&hmi_tx_buffer[len], "");
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_DETALL_MAIN,x+1, 2, (char *)&hmi_tx_buffer[len], "");
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_DETALL_MAIN,x+1, 3, (char *)&hmi_tx_buffer[len], "");
|
||||
for (ch = 0; ch < APP_LEAKAGE_SUB_DEVICE_CH_NUM; ch++)
|
||||
{
|
||||
len += gui_tjc_hmi_tx_text_display(x+1, 4 + (ch*3), (char *)&hmi_tx_buffer[len], "");
|
||||
len += gui_tjc_hmi_tx_text_display(x+1, 5 + (ch*3), (char *)&hmi_tx_buffer[len], "");
|
||||
len += gui_tjc_hmi_tx_text_display(x+1, 6 + (ch*3), (char *)&hmi_tx_buffer[len], "");
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_DETALL_MAIN,x+1, 4 + (ch*3), (char *)&hmi_tx_buffer[len], "");
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_DETALL_MAIN,x+1, 5 + (ch*3), (char *)&hmi_tx_buffer[len], "");
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_DETALL_MAIN,x+1, 6 + (ch*3), (char *)&hmi_tx_buffer[len], "");
|
||||
}
|
||||
len += gui_tjc_hmi_tx_text_display(x+1, 16, (char *)&hmi_tx_buffer[len], "");
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_DETALL_MAIN,x+1, 16, (char *)&hmi_tx_buffer[len], "");
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -1005,9 +1033,9 @@ static void gui_tjc_hmi_detail_main_send(u8 cmd, u8 opa, u8 *p_data)
|
||||
if (leakage.sub_device_data[i].flash_data.state == ENABLE &&
|
||||
leakage.sub_device_data[i].flash_data.modbus_id == device_id) {
|
||||
if (operation == 0x01) {
|
||||
leakage.sub_device_data[i].flash_data.shield = BLOCKED; /* <20><><EFBFBD><EFBFBD> */
|
||||
leakage.sub_device_data[i].shield = BLOCKED; /* <20><><EFBFBD><EFBFBD> */
|
||||
} else if (operation == 0x02) {
|
||||
leakage.sub_device_data[i].flash_data.shield = UNBLOCKED; /* <20>ָ<EFBFBD> */
|
||||
leakage.sub_device_data[i].shield = UNBLOCKED; /* <20>ָ<EFBFBD> */
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
@@ -1043,7 +1071,7 @@ static void gui_tjc_hmi_login_send(u8 cmd,u8 opa,u8 *p_data)
|
||||
gui_tjc_hmi_read_password_from_w25q();
|
||||
memset(hmi_tx_buffer, 0, sizeof(hmi_tx_buffer));
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ<EFBFBD><CABD><EFBFBD>͵<EFBFBD><CDB5>ؼ<EFBFBD> t22_1 */
|
||||
len = gui_tjc_hmi_tx_text_display(22, 1, (char *)hmi_tx_buffer,
|
||||
len = gui_tjc_hmi_tx_text_display(GUI_LOGIN,22, 1, (char *)hmi_tx_buffer,
|
||||
"%d%d%d%d",
|
||||
p_tjc_hmi->password[0],
|
||||
p_tjc_hmi->password[1],
|
||||
@@ -1114,6 +1142,8 @@ static void gui_tjc_hmi_history_alarm_send(u8 cmd,u8 opa,u8 *p_data)
|
||||
page_num++;
|
||||
}
|
||||
|
||||
memset(hmi_tx_buffer, 0, sizeof(hmi_tx_buffer));
|
||||
|
||||
if(HMI_PROTO_CMD_GET == cmd) /* <20><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD> */
|
||||
{
|
||||
switch(opa)
|
||||
@@ -1153,22 +1183,22 @@ static void gui_tjc_hmi_history_alarm_send(u8 cmd,u8 opa,u8 *p_data)
|
||||
if(history.read_history(record_index, &history_record))
|
||||
{
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: t(i+1)_1 */
|
||||
len += gui_tjc_hmi_tx_text_display(i+1, 1,
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_HISTORY_ALARM,i+1, 1,
|
||||
(char *)&hmi_tx_buffer[len],
|
||||
"%s",
|
||||
history_record.region_name);
|
||||
|
||||
/* <20>豸ID: t(i+1)_2 */
|
||||
len += gui_tjc_hmi_tx_text_display(i+1, 2,
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_HISTORY_ALARM,i+1, 2,
|
||||
(char *)&hmi_tx_buffer[len],
|
||||
"%d",
|
||||
history_record.device_id);
|
||||
|
||||
/*ͨ<><CDA8><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>t(i+1)_3*/
|
||||
len += gui_tjc_hmi_tx_text_display(i+1,3,
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_HISTORY_ALARM,i+1,3,
|
||||
(char *)&hmi_tx_buffer[len],
|
||||
"%d",
|
||||
history_record.channel);
|
||||
history_record.channel+1);
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: t(i+1)_4 */
|
||||
alarm_type_str[0] = '\0';
|
||||
@@ -1179,13 +1209,13 @@ static void gui_tjc_hmi_history_alarm_send(u8 cmd,u8 opa,u8 *p_data)
|
||||
else if(history_record.alarm_type == APP_LEAKAGE_SUB_DEVICE_STATE_TIME_OUT)
|
||||
strcat(alarm_type_str, "ͨѶ<EFBFBD><EFBFBD>ʱ");
|
||||
|
||||
len += gui_tjc_hmi_tx_text_display(i+1, 4,
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_HISTORY_ALARM,i+1, 4,
|
||||
(char *)&hmi_tx_buffer[len],
|
||||
"%s",
|
||||
alarm_type_str);
|
||||
|
||||
/* <20>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD>: t(i+1)_5 */
|
||||
len += gui_tjc_hmi_tx_text_display(i+1, 5,
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_HISTORY_ALARM,i+1, 5,
|
||||
(char *)&hmi_tx_buffer[len],
|
||||
"%s",
|
||||
history_record.device_name);
|
||||
@@ -1193,14 +1223,14 @@ static void gui_tjc_hmi_history_alarm_send(u8 cmd,u8 opa,u8 *p_data)
|
||||
/* ©Һ<C2A9><D2BA><EFBFBD><EFBFBD>: t(i+1)_6 (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>©Һ<C2A9><D2BA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ) */
|
||||
if(history_record.alarm_type == APP_LEAKAGE_SUB_DEVICE_STATE_LEAKAGE)
|
||||
{
|
||||
len += gui_tjc_hmi_tx_text_display(i+1, 6,
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_HISTORY_ALARM,i+1, 6,
|
||||
(char *)&hmi_tx_buffer[len],
|
||||
"%d",
|
||||
history_record.leak_distance);
|
||||
}
|
||||
else
|
||||
{
|
||||
len += gui_tjc_hmi_tx_text_display(i+1, 6,
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_HISTORY_ALARM,i+1, 6,
|
||||
(char *)&hmi_tx_buffer[len],
|
||||
"0");
|
||||
}
|
||||
@@ -1214,7 +1244,7 @@ static void gui_tjc_hmi_history_alarm_send(u8 cmd,u8 opa,u8 *p_data)
|
||||
history_record.start_time[4],
|
||||
history_record.start_time[5],
|
||||
history_record.start_time[6]);
|
||||
len += gui_tjc_hmi_tx_text_display(i+1, 7,
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_HISTORY_ALARM,i+1, 7,
|
||||
(char *)&hmi_tx_buffer[len],
|
||||
"%s",
|
||||
time_str);
|
||||
@@ -1222,24 +1252,26 @@ static void gui_tjc_hmi_history_alarm_send(u8 cmd,u8 opa,u8 *p_data)
|
||||
else
|
||||
{
|
||||
/* <20><>ȡʧ<C8A1>ܣ<EFBFBD><DCA3><EFBFBD>ʾ<EFBFBD><CABE> */
|
||||
len += gui_tjc_hmi_tx_text_display(i+1, 1, (char *)&hmi_tx_buffer[len], "");
|
||||
len += gui_tjc_hmi_tx_text_display(i+1, 2, (char *)&hmi_tx_buffer[len], "");
|
||||
len += gui_tjc_hmi_tx_text_display(i+1, 3, (char *)&hmi_tx_buffer[len], "");
|
||||
len += gui_tjc_hmi_tx_text_display(i+1, 4, (char *)&hmi_tx_buffer[len], "");
|
||||
len += gui_tjc_hmi_tx_text_display(i+1, 5, (char *)&hmi_tx_buffer[len], "");
|
||||
len += gui_tjc_hmi_tx_text_display(i+1, 6, (char *)&hmi_tx_buffer[len], "");
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_HISTORY_ALARM,i+1, 1, (char *)&hmi_tx_buffer[len], "");
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_HISTORY_ALARM,i+1, 2, (char *)&hmi_tx_buffer[len], "");
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_HISTORY_ALARM,i+1, 3, (char *)&hmi_tx_buffer[len], "");
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_HISTORY_ALARM,i+1, 4, (char *)&hmi_tx_buffer[len], "");
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_HISTORY_ALARM,i+1, 5, (char *)&hmi_tx_buffer[len], "");
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_HISTORY_ALARM,i+1, 6, (char *)&hmi_tx_buffer[len], "");
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_HISTORY_ALARM,i+1, 7, (char *)&hmi_tx_buffer[len], "");
|
||||
}
|
||||
}
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҳ<EFBFBD><D2B3><EFBFBD><EFBFBD>15<31><35><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʣ<EFBFBD><CAA3><EFBFBD><EFBFBD> */
|
||||
for(; i < HISTORY_ALARM_PER_PAGE; i++)
|
||||
{
|
||||
len += gui_tjc_hmi_tx_text_display(i+1, 1, (char *)&hmi_tx_buffer[len], "");
|
||||
len += gui_tjc_hmi_tx_text_display(i+1, 2, (char *)&hmi_tx_buffer[len], "");
|
||||
len += gui_tjc_hmi_tx_text_display(i+1, 3, (char *)&hmi_tx_buffer[len], "");
|
||||
len += gui_tjc_hmi_tx_text_display(i+1, 4, (char *)&hmi_tx_buffer[len], "");
|
||||
len += gui_tjc_hmi_tx_text_display(i+1, 5, (char *)&hmi_tx_buffer[len], "");
|
||||
len += gui_tjc_hmi_tx_text_display(i+1, 6, (char *)&hmi_tx_buffer[len], "");
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_HISTORY_ALARM,i+1, 1, (char *)&hmi_tx_buffer[len], "");
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_HISTORY_ALARM,i+1, 2, (char *)&hmi_tx_buffer[len], "");
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_HISTORY_ALARM,i+1, 3, (char *)&hmi_tx_buffer[len], "");
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_HISTORY_ALARM,i+1, 4, (char *)&hmi_tx_buffer[len], "");
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_HISTORY_ALARM,i+1, 5, (char *)&hmi_tx_buffer[len], "");
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_HISTORY_ALARM,i+1, 6, (char *)&hmi_tx_buffer[len], "");
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_HISTORY_ALARM,i+1, 7, (char *)&hmi_tx_buffer[len], "");
|
||||
}
|
||||
|
||||
len = strlen((char *)hmi_tx_buffer);
|
||||
@@ -1330,33 +1362,39 @@ static void gui_tjc_hmi_tcp_config_send(u8 cmd,u8 opa,u8 *p_data)
|
||||
{
|
||||
if(p_data[0] == 0x01)
|
||||
{
|
||||
len += gui_tjc_hmi_tx_text_display(1,1,(char *)&hmi_tx_buffer[len],
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_TCP_CONFIG,1,1,(char *)&hmi_tx_buffer[len],
|
||||
"%d.%d.%d.%d",
|
||||
W5500.IP_Addr[0],
|
||||
W5500.IP_Addr[1],
|
||||
W5500.IP_Addr[2],
|
||||
W5500.IP_Addr[3]);
|
||||
|
||||
len += gui_tjc_hmi_tx_text_display(1,2,(char *)&hmi_tx_buffer[len],
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_TCP_CONFIG,1,2,(char *)&hmi_tx_buffer[len],
|
||||
"%d.%d.%d.%d",
|
||||
W5500.Sub_Mask[0],
|
||||
W5500.Sub_Mask[1],
|
||||
W5500.Sub_Mask[2],
|
||||
W5500.Sub_Mask[3]);
|
||||
|
||||
len += gui_tjc_hmi_tx_text_display(1,3,(char *)&hmi_tx_buffer[len],
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_TCP_CONFIG,1,3,(char *)&hmi_tx_buffer[len],
|
||||
"%d.%d.%d.%d",
|
||||
W5500.Gateway_IP[0],
|
||||
W5500.Gateway_IP[1],
|
||||
W5500.Gateway_IP[2],
|
||||
W5500.Gateway_IP[3]);
|
||||
len += gui_tjc_hmi_tx_text_display(1,4,(char *)&hmi_tx_buffer[len],"%s","5000");
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_TCP_CONFIG,1,4,(char *)&hmi_tx_buffer[len],"%d",(W5500.W5500_Class[0].ConfigData.Port[0] << 8) | W5500.W5500_Class[0].ConfigData.Port[1]);
|
||||
}else if(p_data[0] == 0x00)
|
||||
{
|
||||
len += gui_tjc_hmi_tx_text_display(1,1,(char *)&hmi_tx_buffer[len],"%s","192.168.100.100");
|
||||
len += gui_tjc_hmi_tx_text_display(1,2,(char *)&hmi_tx_buffer[len],"%s","255.255.255.0");
|
||||
len += gui_tjc_hmi_tx_text_display(1,3,(char *)&hmi_tx_buffer[len],"%s","192.168.50.1");
|
||||
len += gui_tjc_hmi_tx_text_display(1,4,(char *)&hmi_tx_buffer[len],"%s","5000");
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_TCP_CONFIG,1,1,(char *)&hmi_tx_buffer[len],"%s","192.168.100.100");
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_TCP_CONFIG,1,2,(char *)&hmi_tx_buffer[len],"%s","255.255.255.0");
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_TCP_CONFIG,1,3,(char *)&hmi_tx_buffer[len],"%s","192.168.50.1");
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_TCP_CONFIG,1,4,(char *)&hmi_tx_buffer[len],"%s","5000");
|
||||
sscanf("192.168.100.100","%hhu.%hhu.%hhu.%hhu",&W5500.IP_Addr[0],&W5500.IP_Addr[1],&W5500.IP_Addr[2],&W5500.IP_Addr[3]);
|
||||
sscanf("255.255.255.0","%hhu.%hhu.%hhu.%hhu",&W5500.Sub_Mask[0],&W5500.Sub_Mask[1],&W5500.Sub_Mask[2],&W5500.Sub_Mask[3]);
|
||||
sscanf("192.168.50.1","%hhu.%hhu.%hhu.%hhu",&W5500.Gateway_IP[0],&W5500.Gateway_IP[1],&W5500.Gateway_IP[2],&W5500.Gateway_IP[3]);
|
||||
W5500.W5500_Class[0].ConfigData.Port[0] = (5000 >> 8) & 0xFF;
|
||||
W5500.W5500_Class[0].ConfigData.Port[1] = 5000 & 0xFF;
|
||||
W5500.Init();
|
||||
}
|
||||
}break;
|
||||
case 0x02:/*<2A><>*/
|
||||
@@ -1376,8 +1414,9 @@ static void gui_tjc_hmi_tcp_config_send(u8 cmd,u8 opa,u8 *p_data)
|
||||
{
|
||||
u8 field_count = 0;
|
||||
u8 *current_pos = p_data;
|
||||
u8 ip_str[16], mask_str[16], gw_str[16], dns_str[16];
|
||||
u8 ip_len, mask_len, gw_len, dns_len;
|
||||
u8 ip_str[16], mask_str[16], gw_str[16], port_str[16];
|
||||
u8 ip_len, mask_len, gw_len, port_len;
|
||||
u16 port_val;
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD>IP<49><50>ַ */
|
||||
for (i = 0; i < 16; i++) {
|
||||
@@ -1415,12 +1454,12 @@ static void gui_tjc_hmi_tcp_config_send(u8 cmd,u8 opa,u8 *p_data)
|
||||
}
|
||||
}
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD>DNS<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
||||
for (i = 0; i < 16; i++) {
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD>˿ں<EFBFBD> */
|
||||
for (i = 0; i < 16; i++) {
|
||||
if (current_pos[i] == HMI_PROTO_ASCII_RX_DELINITER) {
|
||||
dns_len = i;
|
||||
memcpy(dns_str, current_pos, dns_len);
|
||||
dns_str[dns_len] = '\0';
|
||||
port_len = i;
|
||||
memcpy(port_str, current_pos, port_len);
|
||||
port_str[port_len] = '\0';
|
||||
current_pos += (i + 1);
|
||||
field_count++;
|
||||
break;
|
||||
@@ -1431,6 +1470,16 @@ static void gui_tjc_hmi_tcp_config_send(u8 cmd,u8 opa,u8 *p_data)
|
||||
parse_ip_string(ip_str, ip_len, W5500.IP_Addr);
|
||||
parse_ip_string(mask_str, mask_len, W5500.Sub_Mask);
|
||||
parse_ip_string(gw_str, gw_len, W5500.Gateway_IP);
|
||||
/* <20>˿ں<CBBF>ת<EFBFBD><D7AA>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD> */
|
||||
port_val = atoi((char*)port_str);
|
||||
W5500.W5500_Class[0].ConfigData.Port[0] = (port_val >> 8) & 0xFF;
|
||||
W5500.W5500_Class[0].ConfigData.Port[1] = port_val & 0xFF;
|
||||
|
||||
/* <20><><EFBFBD>浽Flash */
|
||||
gui_tjc_hmi_save_network_config_to_w25q();
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD>W5500ʹ<30><CAB9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ч */
|
||||
W5500.Init();
|
||||
}
|
||||
|
||||
}break;
|
||||
@@ -1473,7 +1522,7 @@ static void gui_tjc_hmi_device_config_send(u8 cmd,u8 opa,u8 *p_data)
|
||||
enabled_device_count = 0;
|
||||
for(i = 0; i < APP_LEAKAGE_SUB_DEVICE_NUM; i++)
|
||||
{
|
||||
if(leakage.sub_device_data[i].flash_data.state == ENABLE)
|
||||
if(leakage.sub_device_data[i].flash_data.state == ENABLE && leakage.sub_device_data[i].flash_data.modbus_id > 0)
|
||||
{
|
||||
enabled_device_count++;
|
||||
}
|
||||
@@ -1497,10 +1546,10 @@ static void gui_tjc_hmi_device_config_send(u8 cmd,u8 opa,u8 *p_data)
|
||||
{
|
||||
for(i = 0; i < DEVICES_PER_PAGE; i++)
|
||||
{
|
||||
len += gui_tjc_hmi_tx_text_display(i+1, 1, (char *)&hmi_tx_buffer[len], "");
|
||||
len += gui_tjc_hmi_tx_text_display(i+1, 2, (char *)&hmi_tx_buffer[len], "");
|
||||
len += gui_tjc_hmi_tx_text_display(i+1, 3, (char *)&hmi_tx_buffer[len], "");
|
||||
len += gui_tjc_hmi_tx_text_display(i+1, 4, (char *)&hmi_tx_buffer[len], "");
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_DEVICE_CONFIG,i+1, 1, (char *)&hmi_tx_buffer[len], "");
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_DEVICE_CONFIG,i+1, 2, (char *)&hmi_tx_buffer[len], "");
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_DEVICE_CONFIG,i+1, 3, (char *)&hmi_tx_buffer[len], "");
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_DEVICE_CONFIG,i+1, 4, (char *)&hmi_tx_buffer[len], "");
|
||||
}
|
||||
len = strlen((char *)hmi_tx_buffer);
|
||||
gui_tjc_hmi_data_send(hmi_tx_buffer, len);
|
||||
@@ -1538,7 +1587,7 @@ static void gui_tjc_hmi_device_config_send(u8 cmd,u8 opa,u8 *p_data)
|
||||
device_index = page_device_indices[i];
|
||||
|
||||
/*<2A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: t(i+1)_1 */
|
||||
len += gui_tjc_hmi_tx_text_display(i+1, 1,
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_DEVICE_CONFIG,i+1, 1,
|
||||
(char *)&hmi_tx_buffer[len],
|
||||
"%s",
|
||||
leakage.sub_device_data[device_index].flash_data.region_name);
|
||||
@@ -1547,26 +1596,26 @@ static void gui_tjc_hmi_device_config_send(u8 cmd,u8 opa,u8 *p_data)
|
||||
u8 com_port = leakage.sub_device_data[device_index].flash_data.com;
|
||||
if(com_port < 4) /*ȷ<><C8B7><EFBFBD>˿ں<CBBF><DABA><EFBFBD><EFBFBD><EFBFBD>Ч<EFBFBD><D0A7>Χ<EFBFBD><CEA7>*/
|
||||
{
|
||||
len += gui_tjc_hmi_tx_text_display(i+1, 2,
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_DEVICE_CONFIG,i+1, 2,
|
||||
(char *)&hmi_tx_buffer[len],
|
||||
"%s",
|
||||
hmi_proto_string_com[com_port]);
|
||||
}
|
||||
else
|
||||
{
|
||||
len += gui_tjc_hmi_tx_text_display(i+1, 2,
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_DEVICE_CONFIG,i+1, 2,
|
||||
(char *)&hmi_tx_buffer[len],
|
||||
"δ֪");
|
||||
}
|
||||
|
||||
/*<2A>豸ID: t(i+1)_3 */
|
||||
len += gui_tjc_hmi_tx_text_display(i+1, 3,
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_DEVICE_CONFIG,i+1, 3,
|
||||
(char *)&hmi_tx_buffer[len],
|
||||
"%d",
|
||||
leakage.sub_device_data[device_index].flash_data.modbus_id);
|
||||
|
||||
/*<2A>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD>: t(i+1)_4 */
|
||||
len += gui_tjc_hmi_tx_text_display(i+1, 4,
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_DEVICE_CONFIG,i+1, 4,
|
||||
(char *)&hmi_tx_buffer[len],
|
||||
"%s",
|
||||
leakage.sub_device_data[device_index].flash_data.device_name);
|
||||
@@ -1578,22 +1627,22 @@ static void gui_tjc_hmi_device_config_send(u8 cmd,u8 opa,u8 *p_data)
|
||||
for(i = page_device_count; i < DEVICES_PER_PAGE; i++)
|
||||
{
|
||||
/*<2A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*/
|
||||
len += gui_tjc_hmi_tx_text_display(i+1, 1,
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_DEVICE_CONFIG,i+1, 1,
|
||||
(char *)&hmi_tx_buffer[len],
|
||||
"");
|
||||
|
||||
/*<2A><><EFBFBD>ն˿ں<CBBF>*/
|
||||
len += gui_tjc_hmi_tx_text_display(i+1, 2,
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_DEVICE_CONFIG,i+1, 2,
|
||||
(char *)&hmi_tx_buffer[len],
|
||||
"");
|
||||
|
||||
/*<2A><><EFBFBD><EFBFBD><EFBFBD>豸ID*/
|
||||
len += gui_tjc_hmi_tx_text_display(i+1, 3,
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_DEVICE_CONFIG,i+1, 3,
|
||||
(char *)&hmi_tx_buffer[len],
|
||||
"");
|
||||
|
||||
/*<2A><><EFBFBD><EFBFBD><EFBFBD>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD>*/
|
||||
len += gui_tjc_hmi_tx_text_display(i+1, 4,
|
||||
len += gui_tjc_hmi_tx_text_display(GUI_DEVICE_CONFIG,i+1, 4,
|
||||
(char *)&hmi_tx_buffer[len],
|
||||
"");
|
||||
}
|
||||
@@ -1814,6 +1863,11 @@ static void gui_tjc_hmi_device_config_send(u8 cmd,u8 opa,u8 *p_data)
|
||||
id_str[i] = '\0';
|
||||
new_device.modbus_id = atoi(id_str);
|
||||
|
||||
if(new_device.modbus_id < 1 && new_device.modbus_id > 255)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
current_pos += (i + 1);
|
||||
field_count++;
|
||||
break;
|
||||
@@ -1841,7 +1895,7 @@ static void gui_tjc_hmi_device_config_send(u8 cmd,u8 opa,u8 *p_data)
|
||||
{
|
||||
new_device.state = ENABLE;
|
||||
new_device.baudrate = app_com.com[new_device.com].flash_data.baudrate;
|
||||
new_device.shield = UNBLOCKED;
|
||||
leakage.sub_device_data[x].shield = UNBLOCKED;
|
||||
leakage.sub_device_data[x].flash_data = new_device;
|
||||
gui_tjc_hmi_save_device_info_to_w25q();
|
||||
gui_tjc_hmi_class_update();
|
||||
@@ -1859,7 +1913,7 @@ static void gui_tjc_hmi_device_config_send(u8 cmd,u8 opa,u8 *p_data)
|
||||
/*<2A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*/
|
||||
new_device.baudrate = app_com.com[new_device.com].flash_data.baudrate;
|
||||
|
||||
new_device.shield = UNBLOCKED;
|
||||
leakage.sub_device_data[empty_slot_index].shield = UNBLOCKED;
|
||||
|
||||
/*<2A><><EFBFBD>ӵ<EFBFBD>app_leakage<67><65><EFBFBD>豸<EFBFBD>б<EFBFBD><D0B1><EFBFBD>*/
|
||||
leakage.sub_device_data[empty_slot_index].flash_data = new_device;
|
||||
@@ -1892,7 +1946,7 @@ static void gui_tjc_hmi_device_config_send(u8 cmd,u8 opa,u8 *p_data)
|
||||
case 0x02:/*ɾ<><C9BE><EFBFBD>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD><EFBFBD>豸<EFBFBD><E8B1B8>Ϣ<EFBFBD><CFA2>w25q<35><71>ɾ<EFBFBD><C9BE>*/
|
||||
{
|
||||
|
||||
u8 page_device_indices[8] = {0}; /*<2A>洢<EFBFBD><E6B4A2>ǰҳ8<D2B3><38><EFBFBD>豸<EFBFBD><E8B1B8>app_leakage<67>е<EFBFBD><D0B5><EFBFBD><EFBFBD><EFBFBD>*/
|
||||
u8 page_device_indices[8] = {0}; /*<2A>洢<EFBFBD><E6B4A2>ǰҳ8<D2B3><38><EFBFBD>豸<EFBFBD><E8B1B8>app_leakage<67>е<EFBFBD><D0B5><EFBFBD><EFBFBD><EFBFBD>*/
|
||||
u8 page_device_count = 0; /*<2A><>ǰҳʵ<D2B3><CAB5><EFBFBD><EFBFBD><EFBFBD>õ<EFBFBD><C3B5>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD>*/
|
||||
u8 current_enabled_index = 0; /*<2A><>ǰ<EFBFBD>ǵڼ<C7B5><DABC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>õ<EFBFBD><C3B5>豸*/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user