From 71f8bdb7c63acc381d71105bb950411029f4250f Mon Sep 17 00:00:00 2001
From: jinlicong <493886250@qq.com>
Date: Mon, 03 Jun 2024 20:00:58 +0800
Subject: [PATCH] 测试远传

---
 Function/LCD/lcd_cfg_api.c |  674 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 674 insertions(+), 0 deletions(-)

diff --git a/Function/LCD/lcd_cfg_api.c b/Function/LCD/lcd_cfg_api.c
new file mode 100644
index 0000000..0e5fff3
--- /dev/null
+++ b/Function/LCD/lcd_cfg_api.c
@@ -0,0 +1,674 @@
+/*
+ * File      : lcd_cfg_api.c
+ * This file is part of Sizhu Ultrasonic Gas-Meter
+ * COPYRIGHT (C) 2022,Sizhu Ultrasonic Gas-Meter Development Team
+ *
+ * Brief     : This file configures the specific display.
+ * http://www.ideacreated.com/
+ *
+ * Change Logs:
+ * Date           Author            Notes
+ * 2022-08-22     Sizhu_J1anG       the first version
+ * 2022-08-30     Sizhu_Ye          targeted modification
+ */
+ 
+ 
+#include "lcd_cfg_api.h"
+#include "lcd_io_api.h"
+#include "system_general_para.h"
+#include "extern_rtc.h"
+#include "wireless_remote_comm.h"
+#include "linked_list.h"
+
+
+/*������ʾ*/
+void Lcd_Battery(PWR_VOL_T pwr_para_in)
+{
+	
+	LCD_DISPLAY_SEG(_LCD_BATTERY_SHELL_23A); //������ʾ��ؿ�
+	if((sys_clockBCD_g.sec & 0x04 ) == 0){
+		//��ʾ﮵�
+		LCD_DISPLAY_SEG(_LCD_METER_23A);  //���������ַ�
+		if(pwr_para_in.lith_synthesize_per > BAT_PERSENT_LEVEL_0)
+			LCD_DISPLAY_SEG(_LCD_BATTERY_1_23A);
+		if(pwr_para_in.lith_synthesize_per > BAT_PERSENT_LEVEL_1)
+			LCD_DISPLAY_SEG(_LCD_BATTERY_2_23A);
+		if(pwr_para_in.lith_synthesize_per > BAT_PERSENT_LEVEL_2)
+			LCD_DISPLAY_SEG(_LCD_BATTERY_3_23A);
+		if(pwr_para_in.lith_synthesize_per > BAT_PERSENT_LEVEL_3)
+			LCD_DISPLAY_SEG(_LCD_BATTERY_4_23A);
+		
+	}else{
+		//��ʾ���
+		LCD_DISPLAY_SEG(_LCD_SIGNAL_COMMUNICATION_23A); //��ͨѶ���ַ�
+		if(pwr_para_in.alka_vcc_per > BAT_PERSENT_LEVEL_0)
+			LCD_DISPLAY_SEG(_LCD_BATTERY_1_23A);
+		if(pwr_para_in.alka_vcc_per > BAT_PERSENT_LEVEL_1)
+			LCD_DISPLAY_SEG(_LCD_BATTERY_2_23A);
+		if(pwr_para_in.alka_vcc_per > BAT_PERSENT_LEVEL_2)
+			LCD_DISPLAY_SEG(_LCD_BATTERY_3_23A);
+		if(pwr_para_in.alka_vcc_per > BAT_PERSENT_LEVEL_3)
+			LCD_DISPLAY_SEG(_LCD_BATTERY_4_23A);
+	}
+}
+
+/*
+ *��ͨҳ��1
+ *˲ʱ��� + �������
+ */
+void Lcd_NormalPage_1(float instant_sc,double cumulate_sc)
+{
+	/*���������ʾ*/
+	LCD_DISPLAY_SEG(_LCD_STAND_CONDITION_23A); //�ַ��������
+	LCD_DISPLAY_SEG(_LCD_TOTAL_23A); //�ַ���������
+	LCD_DISPLAY_SEG(_LCD_N_1_23A); //�ַ���N��
+	LCD_DISPLAY_SEG(_LCD_M3_1_23A);//�ַ���M^3��
+	Lcd_DisplayFirstLine_23A(1,cumulate_sc);
+	/*˲ʱ�����ʾ*/
+	LCD_DISPLAY_SEG(_LCD_N_2_23A); //�ڶ����ַ���N��
+	LCD_DISPLAY_SEG(_LCD_M3_2_23A);//�ڶ����ַ���M^3��
+	LCD_DISPLAY_SEG(_LCD_h_23A); //�ַ���/h��
+	Lcd_DisplaySecondLine_23A(1,instant_sc);	
+}
+/*
+ *��ͨҳ��2
+ *���� + ���
+ */
+void Lcd_NormalPage_2(float price,float balance,uint8_t price_mode)
+{
+//	if(__SYS_FUNC_CFG_BYTES_GET(balance_display_set) == 0)
+//	{
+//		/*�����ʾ*/
+//		LCD_DISPLAY_SEG(_LCD_SURPLUSE_23A); //�ַ���ʣ�ࡱ
+//		LCD_DISPLAY_SEG(_LCD_YUAN_1_23A);
+//		Lcd_DisplayFirstLine_23A(1,balance);
+//	}
+//	if(__SYS_FUNC_CFG_BYTES_GET(price_display_set) == 0)
+//	{
+//		/*����*/
+//		if(price_mode == SPM_LADDER)
+//				LCD_DISPLAY_SEG(_LCD_LADDER_23A);//�ַ������ݡ�
+//		LCD_DISPLAY_SEG(_LCD_UNIT_PRICE_23A); //�ַ������ۡ�
+//		LCD_DISPLAY_SEG(_LCD_YUAN_2_23A); //�ַ���Ԫ��
+//		LCD_DISPLAY_SEG(_LCD_YUAN_M3_23A);//�ַ���/m^3��
+//		Lcd_DisplaySecondLine_23A(1,price);
+//	}
+}
+/*
+ *��ͨҳ��3
+ *�¶� + �������
+ */
+void Lcd_NormalPage_3(float temp,double cumulate_sc)
+{
+	/*���������ʾ*/
+	LCD_DISPLAY_SEG(_LCD_STAND_CONDITION_23A);
+	LCD_DISPLAY_SEG(_LCD_TOTAL_23A);
+	LCD_DISPLAY_SEG(_LCD_N_1_23A); //�ַ���N��
+	LCD_DISPLAY_SEG(_LCD_M3_1_23A);//�ַ���M^3��
+	Lcd_DisplayFirstLine_23A(1,cumulate_sc);
+	/*�¶�*/
+	LCD_DISPLAY_SEG(_LCD_oC_23A);
+	Lcd_DisplaySecondLine_23A(1,temp);
+}
+/*
+ *��ͨҳ��4
+ *ѹ�� + �������
+ */
+void Lcd_NormalPage_4(float press,double cumulate_sc)
+{
+	/*���������ʾ*/
+	LCD_DISPLAY_SEG(_LCD_STAND_CONDITION_23A);
+	LCD_DISPLAY_SEG(_LCD_TOTAL_23A);
+	LCD_DISPLAY_SEG(_LCD_N_1_23A); //�ַ���N��
+	LCD_DISPLAY_SEG(_LCD_M3_1_23A);//�ַ���M^3��
+	Lcd_DisplayFirstLine_23A(1,cumulate_sc);
+	/*ѹ��*/
+	LCD_DISPLAY_SEG(_LCD_kPa_23A);
+	Lcd_DisplaySecondLine_23A(1,press);
+}
+/*
+ *��ͨҳ��5
+ *˲ʱ���� + ��������
+ */
+void Lcd_NormalPage_5(float instant_wc,double cumulate_wc)
+{
+	/*����������ʾ*/
+	LCD_DISPLAY_SEG(_LCD_WORK_CONDITION_23A);
+	LCD_DISPLAY_SEG(_LCD_TOTAL_23A);
+	LCD_DISPLAY_SEG(_LCD_M3_1_23A);//�ַ���M^3��
+	Lcd_DisplayFirstLine_23A(1,cumulate_wc);
+	/*˲ʱ�����ʾ*/
+	LCD_DISPLAY_SEG(_LCD_M3_2_23A);//�ڶ����ַ���M^3��
+	LCD_DISPLAY_SEG(_LCD_h_23A); //�ַ���/h��
+	Lcd_DisplaySecondLine_23A(1,instant_wc);
+}
+/*���*/
+void Lcd_ParaPage_MeterNum(uint8_t pMeterNum_bcd[])
+{
+	uint8_t i = 0;
+#ifdef LCD_NEW
+	i = 2;
+	Lcd_DisplayDigit_23A(5,BCD_2_DECIMAL(pMeterNum_bcd[0]) / 10);
+#endif	
+	Lcd_DisplayDigit_23A(4 + i,BCD_2_DECIMAL(pMeterNum_bcd[0]) % 10);
+	Lcd_DisplayDigit_23A(5 + i,BCD_2_DECIMAL(pMeterNum_bcd[1]) / 10);
+	Lcd_DisplayDigit_23A(6 + i,BCD_2_DECIMAL(pMeterNum_bcd[1]) % 10);
+	Lcd_DisplayDigit_23A(7 + i,BCD_2_DECIMAL(pMeterNum_bcd[2]) / 10);
+	Lcd_DisplayDigit_23A(8 + i,BCD_2_DECIMAL(pMeterNum_bcd[2]) % 10);
+	Lcd_DisplayDigit_23A(9 + i,BCD_2_DECIMAL(pMeterNum_bcd[3]) / 10);
+	Lcd_DisplayDigit_23A(10 + i,BCD_2_DECIMAL(pMeterNum_bcd[3]) % 10);
+	Lcd_DisplayDigit_23A(11 + i,BCD_2_DECIMAL(pMeterNum_bcd[4]) / 10);
+	Lcd_DisplayDigit_23A(12 + i,BCD_2_DECIMAL(pMeterNum_bcd[4]) % 10);
+	Lcd_DisplayDigit_23A(13 + i,BCD_2_DECIMAL(pMeterNum_bcd[5]) / 10);
+	Lcd_DisplayDigit_23A(14 + i,BCD_2_DECIMAL(pMeterNum_bcd[5]) % 10);
+	Lcd_DisplayDigit_23A(15 + i,BCD_2_DECIMAL(pMeterNum_bcd[6]) / 10);
+	Lcd_DisplayDigit_23A(16 + i,BCD_2_DECIMAL(pMeterNum_bcd[6]) % 10);
+	Lcd_DisplayDigit_23A(17 + i,BCD_2_DECIMAL(pMeterNum_bcd[7]) / 10);
+	Lcd_DisplayDigit_23A(18 + i,BCD_2_DECIMAL(pMeterNum_bcd[7]) % 10);
+}
+/*���������
+third_flag���Ƿ��е�������־λ
+*/
+void Lcd_ParaPage_ThirdParty_MeterNum(uint8_t third_flag,uint16_t * pMeterNum)
+{
+	if(third_flag)
+	{
+		/*��ʾ���*/
+	}
+	else
+	{
+		/*��ʾNONE*/
+		Lcd_DisplayLetter(7,LCD_N);
+		Lcd_DisplayLetter(8,LCD_O);
+		Lcd_DisplayLetter(9,LCD_N);
+		Lcd_DisplayLetter(10,LCD_E);
+	}
+}
+
+/****************************************
+���ƣ�Lcd_Show_time(u8 year,u8 month,u8 day,u8 hour,u8 minute,u8 second)
+���ܣ���ʾ������ʱ���� HEX
+ʱ�䣺220818
+****************************************/
+void Lcd_Show_time(u8 year,u8 month,u8 day,u8 hour,u8 minute,u8 second)
+{	
+	uint8_t i = 0;
+#ifdef LCD_NEW
+	i = 1;
+	LCD_DISPLAY_SEG(_LCD_7G_new); //���
+	LCD_DISPLAY_SEG(_LCD_10G_new);
+#else
+	LCD_DISPLAY_SEG(_LCD_7G_23A); //���
+	LCD_DISPLAY_SEG(_LCD_10G_23A);
+#endif	
+	Lcd_DisplayDigit_23A(5,year/10);
+	Lcd_DisplayDigit_23A(6,year%10);
+	
+	Lcd_DisplayDigit_23A(8,month/10);
+	Lcd_DisplayDigit_23A(9,month%10);
+	
+	Lcd_DisplayDigit_23A(11,day/10);
+	Lcd_DisplayDigit_23A(12,day%10);
+	
+
+	
+	Lcd_DisplayDigit_23A(13 + i,hour/10);
+	Lcd_DisplayDigit_23A(14 + i,hour%10);
+	
+	Lcd_DisplayDigit_23A(15 + i,minute/10);
+	Lcd_DisplayDigit_23A(16 + i,minute%10);
+	
+	Lcd_DisplayDigit_23A(17 + i,second/10);
+	Lcd_DisplayDigit_23A(18 + i,second%10);
+	
+	LCD_DISPLAY_SEG(_LCD_POINT19_23A); //���š��㡱
+	LCD_DISPLAY_SEG(_LCD_POINT20_23A);
+	LCD_DISPLAY_SEG(_LCD_POINT23_23A);
+	LCD_DISPLAY_SEG(_LCD_POINT24_23A);
+}
+
+/*IP�Ͷ˿ں�*/
+void Lcd_ParaPage_IpPort(uint8_t * pIp,uint16_t * pPort)
+{
+	uint8_t i = 0;
+#ifdef LCD_NEW
+	i = 1;
+#endif	
+	LCD_DISPLAY_SEG(_LCD_POINT3_23A); // 3 4 10 22
+	LCD_DISPLAY_SEG(_LCD_POINT4_23A);
+	Lcd_DisplayLetter(5 + i,LCD_P);
+
+	//IP����6�룬�˿ڳ���4�룬һ��ѭ��
+	if((sys_clockBCD_g.sec & 4) == 0) //IP
+	{
+		Lcd_DisplayLetter(4 + i,LCD_I);
+			
+		Lcd_DisplayDigit_23A(6 + i,pIp[0] / 100);
+		Lcd_DisplayDigit_23A(7 + i,pIp[0] / 10 % 10);
+		Lcd_DisplayDigit_23A(8 + i,pIp[0] % 10);
+		
+		LCD_DISPLAY_SEG(_LCD_POINT10_23A);
+		
+		Lcd_DisplayDigit_23A(9 + i,pIp[1] / 100);
+		Lcd_DisplayDigit_23A(10 + i,pIp[1] / 10 % 10);
+		Lcd_DisplayDigit_23A(11 + i,pIp[1] % 10);
+		
+		Lcd_DisplayDigit_23A(13 + i,pIp[2] / 100);
+		Lcd_DisplayDigit_23A(14 + i,pIp[2] / 10 % 10);
+		Lcd_DisplayDigit_23A(15 + i,pIp[2] % 10);
+		
+		LCD_DISPLAY_SEG(_LCD_POINT22_23A);
+		
+		Lcd_DisplayDigit_23A(16 + i,pIp[3] / 100);
+		Lcd_DisplayDigit_23A(17 + i,pIp[3] / 10 % 10);
+		Lcd_DisplayDigit_23A(18 + i,pIp[3] % 10);
+	}
+	else //�˿�
+	{
+		Lcd_DisplayDigit_23A(6 + i,pPort[0] / 10000);  //��λ
+		Lcd_DisplayDigit_23A(7 + i,pPort[0] / 1000 % 10);//ǧλ
+		Lcd_DisplayDigit_23A(8 + i,pPort[0] / 100 % 10);//��λ
+		Lcd_DisplayDigit_23A(9 + i,pPort[0] / 10 % 10);//ʮλ
+		Lcd_DisplayDigit_23A(10 + i,pPort[0] % 10);//��λ	
+	}
+}
+/*������IP�Ͷ˿ں�
+third_flag���Ƿ��е�������־λ
+*/
+void Lcd_ParaPage_ThirdParty_IpPort(uint8_t third_flag,uint8_t * pIp,uint16_t * pPort)
+{
+	uint8_t i = 0;
+#ifdef LCD_NEW
+	i = 1;
+#endif
+	if(third_flag)
+	{
+		/*��ʾIP�Ͷ˿�*/
+		LCD_DISPLAY_SEG(_LCD_POINT5_23A);//5 6 12 24
+		LCD_DISPLAY_SEG(_LCD_POINT6_23A);
+		Lcd_DisplayLetter(6 + i,LCD_P);
+		//IP����6�룬�˿ڳ���4�룬һ��ѭ��
+		if((sys_clockBCD_g.sec & 4) == 0) //IP
+		{
+			/*��ʾOIP��other ip������������˼��IP�͵�����IP*/
+			Lcd_DisplayLetter(5 + i,LCD_I);
+			Lcd_DisplayLetter(4 + i,LCD_O);
+				
+			Lcd_DisplayDigit_23A(7 + i,pIp[0] / 100);
+			Lcd_DisplayDigit_23A(8 + i,pIp[0] / 10 % 10);
+			Lcd_DisplayDigit_23A(9 + i,pIp[0] % 10);
+			
+			LCD_DISPLAY_SEG(_LCD_POINT12_23A);
+			
+			Lcd_DisplayDigit_23A(10 + i,pIp[1] / 100);
+			Lcd_DisplayDigit_23A(11 + i,pIp[1] / 10 % 10);
+			Lcd_DisplayDigit_23A(12 + i,pIp[1] % 10);
+			
+			Lcd_DisplayDigit_23A(13 + i,pIp[2] / 100);
+			Lcd_DisplayDigit_23A(14 + i,pIp[2] / 10 % 10);
+			Lcd_DisplayDigit_23A(15 + i,pIp[2] % 10);
+			
+			LCD_DISPLAY_SEG(_LCD_POINT24_23A);
+			
+			Lcd_DisplayDigit_23A(16 + i,pIp[3] / 100);
+			Lcd_DisplayDigit_23A(17 + i,pIp[3] / 10 % 10);
+			Lcd_DisplayDigit_23A(18 + i,pIp[3] % 10);
+		}
+		else //�˿�
+		{
+			Lcd_DisplayDigit_23A(7 + i,pPort[0] / 10000);  //��λ
+			Lcd_DisplayDigit_23A(8 + i,pPort[0] / 1000 % 10);//ǧλ
+			Lcd_DisplayDigit_23A(9 + i,pPort[0] / 100 % 10);//��λ
+			Lcd_DisplayDigit_23A(10 + i,pPort[0] / 10 % 10);//ʮλ
+			Lcd_DisplayDigit_23A(11 + i,pPort[0] % 10);//��λ
+		}
+	}
+	else
+	{
+		/*��ʾUNKNOWN*/
+		Lcd_DisplayLetter(5 + i,LCD_U);
+		Lcd_DisplayLetter(6 + i,LCD_N);
+		Lcd_DisplayLetter(7 + i,LCD_K);
+		Lcd_DisplayLetter(8 + i,LCD_N);
+		Lcd_DisplayLetter(9 + i,LCD_O);
+		Lcd_DisplayLetter(10 + i,LCD_W);
+		Lcd_DisplayLetter(11 + i,LCD_N);
+	}
+}
+
+
+
+/*����汾��*/
+void Lcd_ParaPage_SoftVer(uint8_t * pSoftVer)
+{
+	uint8_t i = 0;
+#ifdef LCD_NEW
+	i = 1;
+#endif
+	Lcd_DisplayLetter(4 + i,LCD_S);
+	Lcd_DisplayLetter(5 + i,LCD_V);
+	
+	LCD_DISPLAY_SEG(_LCD_POINT3_23A);
+	LCD_DISPLAY_SEG(_LCD_POINT4_23A);
+	
+	Lcd_DisplayDigit_23A(7 + i,BCD_2_DECIMAL(pSoftVer[0]) / 10);
+	Lcd_DisplayDigit_23A(8 + i,BCD_2_DECIMAL(pSoftVer[0]) % 10);
+	
+	LCD_DISPLAY_SEG(_LCD_POINT10_23A);
+	
+	Lcd_DisplayDigit_23A(9 + i,BCD_2_DECIMAL(pSoftVer[1]) / 10);
+	Lcd_DisplayDigit_23A(10 + i,BCD_2_DECIMAL(pSoftVer[1]) % 10);
+	
+	LCD_DISPLAY_SEG(_LCD_POINT14_23A);
+	
+	Lcd_DisplayDigit_23A(11 + i,BCD_2_DECIMAL(pSoftVer[2]) / 10);
+	Lcd_DisplayDigit_23A(12 + i,BCD_2_DECIMAL(pSoftVer[2]) % 10);
+	
+	LCD_DISPLAY_SEG(_LCD_POINT18_23A);
+	
+	Lcd_DisplayDigit_23A(14 + i,BCD_2_DECIMAL(pSoftVer[3]) / 10);
+	Lcd_DisplayDigit_23A(15 + i,BCD_2_DECIMAL(pSoftVer[3]) % 10);	
+}
+/*Ӳ���汾��*/
+void Lcd_ParaPage_HardVer(uint8_t * pHardVer)
+{	
+	uint8_t i = 0;
+#ifdef LCD_NEW
+	i = 1;
+#endif	
+	Lcd_DisplayLetter(4 + i,LCD_H);
+	Lcd_DisplayLetter(5 + i,LCD_V);
+	
+	LCD_DISPLAY_SEG(_LCD_POINT3_23A);
+	LCD_DISPLAY_SEG(_LCD_POINT4_23A);
+	
+	Lcd_DisplayDigit_23A(7 + i,BCD_2_DECIMAL(pHardVer[0]) / 10);
+	Lcd_DisplayDigit_23A(8 + i,BCD_2_DECIMAL(pHardVer[0]) % 10);
+	Lcd_DisplayDigit_23A(9 + i,BCD_2_DECIMAL(pHardVer[1]) / 10);
+	Lcd_DisplayDigit_23A(10 + i,BCD_2_DECIMAL(pHardVer[1]) % 10);
+	Lcd_DisplayDigit_23A(11 + i,BCD_2_DECIMAL(pHardVer[2]) / 10);
+	
+	LCD_DISPLAY_SEG(_LCD_POINT16_23A);
+	
+	Lcd_DisplayDigit_23A(12 + i,BCD_2_DECIMAL(pHardVer[2]) % 10);
+	Lcd_DisplayDigit_23A(13 + i,BCD_2_DECIMAL(pHardVer[3]) / 10);
+	Lcd_DisplayDigit_23A(14 + i,BCD_2_DECIMAL(pHardVer[3]) % 10);
+	Lcd_DisplayDigit_23A(15 + i,BCD_2_DECIMAL(pHardVer[4]) / 10);
+	
+	LCD_DISPLAY_SEG(_LCD_POINT22_23A);
+	
+	Lcd_DisplayDigit_23A(16 + i,pHardVer[4] % 10);
+}
+/*����*/
+void Lcd_ParaPage_SoundVel(float sound_velocity)
+{
+	uint8_t i = 0;
+#ifdef LCD_NEW
+	i = 1;
+#endif	
+	/*speed of sound*/
+	Lcd_DisplayLetter(7 + i,LCD_S);
+	Lcd_DisplayLetter(8 + i,LCD_O);
+	Lcd_DisplayLetter(9 + i,LCD_S);
+	LCD_DISPLAY_SEG(_LCD_POINT11_23A);
+	LCD_DISPLAY_SEG(_LCD_POINT12_23A);
+	Lcd_DisplaySecondLine_23A(1,sound_velocity);
+}
+/*�궨ģʽ��ʾ*/
+void Lcd_CalibPage(float cal_instant_wc,double cumulate_wc)
+{
+	/*����������ʾ*/
+	LCD_DISPLAY_SEG(_LCD_WORK_CONDITION_23A);
+	LCD_DISPLAY_SEG(_LCD_TOTAL_23A);
+//	LCD_DISPLAY_SEG(_LCD_N_1_23A); //�ַ���N��
+	LCD_DISPLAY_SEG(_LCD_M3_1_23A);//�ַ���M^3��
+	Lcd_DisplayFirstLine_23A(0,cumulate_wc);
+//	/*������*/
+//	LCD_DISPLAY_SEG(_LCD_L_pul_23A);
+//	Lcd_DisplayDigit_23A(15,pulse_value);
+	/*˲ʱ�����ʾ*/
+	LCD_DISPLAY_SEG(_LCD_M3_2_23A);//�ڶ����ַ���M^3��
+	LCD_DISPLAY_SEG(_LCD_h_23A); //�ַ���/h��
+	Lcd_DisplaySecondLine_23A(1,cal_instant_wc * 3600 * 4);
+}
+
+/*�ɹ�/ʧ����ʾ*/
+void Lcd_SuccErrPage(ErrorStatus_STM32 result_flag_flag)
+{
+	uint8_t i = 0;
+#ifdef LCD_NEW
+	i = 1;
+#endif	
+	if(result_flag_flag == SUCCESS_0)
+	{
+		Lcd_DisplayLetter(7 + i,LCD_S);
+		Lcd_DisplayLetter(8 + i,LCD_U);
+		Lcd_DisplayLetter(9 + i,LCD_C);
+		Lcd_DisplayLetter(10 + i,LCD_C);
+	}
+	else
+	{
+		Lcd_DisplayLetter(7 + i,LCD_E);
+		Lcd_DisplayLetter(8 + i,LCD_R);
+		Lcd_DisplayLetter(9 + i,LCD_R);
+	}
+}
+
+
+
+/*������ʾ*/
+void Lcd_ValveShow(VALVE_STATUS valve_state,uint16_t valve_close_ID,VALVE_LOCK_STATE_T valve_lock_status)
+{
+	static uint8_t show_flag = 0;
+	switch(valve_state)
+	{
+		case VALVE_NONE:
+			break;
+		case VALVE_OPEN:
+			LCD_DISPLAY_SEG(_LCD_VALVE_M_23A);
+			LCD_DISPLAY_SEG(_LCD_OPEN_23A);
+			break;
+		case VALVE_CLOSE:
+			LCD_DISPLAY_SEG(_LCD_VALVE_M_23A);
+			LCD_DISPLAY_SEG(_LCD_CLOSE_23A);
+			break;
+		case VALVE_OPENING:
+			LCD_DISPLAY_SEG(_LCD_VALVE_M_23A);
+			if((sys_clockBCD_g.sec & 0x01) == 0)
+				LCD_DISPLAY_SEG(_LCD_OPEN_23A);
+			break;
+		case VALVE_CLOSING:
+			LCD_DISPLAY_SEG(_LCD_VALVE_M_23A);
+			if((sys_clockBCD_g.sec & 0x01) == 0)
+				LCD_DISPLAY_SEG(_LCD_CLOSE_23A);
+			break;
+		case VALVE_ERROR:
+			if((sys_clockBCD_g.sec & 0x01) == 0)
+				LCD_DISPLAY_SEG(_LCD_VALVE_M_23A);
+			break;
+		default:break;
+	}
+	if(valve_lock_status == VL_LOCK)
+		LCD_DISPLAY_SEG(_LCD_LOCK_23A);
+	valve_close_ID &=(~0x8000); 
+	if(valve_state == VALVE_CLOSE && (valve_close_ID <= 0xff))
+	{
+		Lcd_DisplayDigit_23A(1,BCD_2_DECIMAL(valve_close_ID) / 10);
+		Lcd_DisplayDigit_23A(2,BCD_2_DECIMAL(valve_close_ID) % 10);
+	}
+}
+
+/*������ʾ*/
+#define ALARM_ID_SHOW_MAX 5
+void Lcd_WaringShow(uint8_t list_cnt,uint8_t sec_bcd)
+{
+	uint8_t i = 0;
+#ifdef LCD_NEW
+	i = 1;
+#endif	
+	static uint8_t sec_limit_flag = 0; //����ѭ��������ʾʱ��������ҳ������ʾ������������
+	static uint8_t temp_list_cnt_flag = 0; //�����жϱ����Ƿ���ɾ
+	static uint8_t show_min_flag = 0; //��ʾ�жϵ���Сֵ��־λ
+	__IO static int8_t alarm_show_num = 0; //������ʾ�ij��ȣ����ڲ��������еı���ID
+	__IO static SYS_ALARM_VALVE_T alarm_id = ALARM_ID_NORMAL;
+	ALARM_NODE_T * ptr = pList_head;
+	if((sec_bcd & 1) && (ptr != NULL))//ÿ2S�޸�һ������ & ��������������
+	{
+		if(sec_limit_flag != sec_bcd)
+		{
+			sec_limit_flag = sec_bcd;
+			if(temp_list_cnt_flag != list_cnt) //��������or��ʧʱ�������µı�����ʼ��ʾ
+			{
+				alarm_show_num = temp_list_cnt_flag = list_cnt; 
+				if(list_cnt > ALARM_ID_SHOW_MAX) //����ѭ����ʾ��Сֵ
+					show_min_flag = list_cnt - ALARM_ID_SHOW_MAX; 
+				else
+					show_min_flag = 0;
+			}
+			if(--alarm_show_num < show_min_flag) //һ��ѭ���󣬻ص���ʼֵ
+				alarm_show_num = list_cnt - 1;
+			/*�������*/
+			for(uint8_t j = 0;j < alarm_show_num;j++)
+				ptr = ptr->alarm_list_next;
+			alarm_id = ptr->list_data;
+		}
+	}else if(ptr == NULL && temp_list_cnt_flag != 0) // ��ǰ�б���������û��
+	{
+		alarm_id = ALARM_ID_NORMAL;
+		temp_list_cnt_flag = list_cnt;
+	}
+	/*������ʾ*/
+	if((alarm_id != ALARM_ID_NORMAL)&&(alarm_id <= 0xff))	
+	{
+		LCD_DISPLAY_SEG(_LCD_WARNING_23A);
+		Lcd_DisplayDigit_23A(2 + i,BCD_2_DECIMAL(alarm_id) / 10);
+		Lcd_DisplayDigit_23A(3 + i,BCD_2_DECIMAL(alarm_id) % 10);
+	}
+}
+
+
+/*Զ����ʾ*/
+void Lcd_WrcShow(FlagStatus wrc_running_status,ErrorStatus last_wrc_result,uint8_t flag_4g,uint8_t signal_intensity)
+{
+	static uint8_t temp_sig = 0;
+	if((flag_4g>>4) == 4)
+		LCD_DISPLAY_SEG(_LCD_4G_Flag_23A);
+	/*�����ϴ�ʱ��ʾ*/
+	if(wrc_running_status == SET)
+	{
+		LCD_DISPLAY_SEG(_LCD_WIFI_23A);
+		temp_sig++;
+		switch(temp_sig)
+		{
+			case 1:
+				LCD_DISPLAY_SEG(_LCD_4G_1_23A);
+				break;
+			case 2:
+				LCD_DISPLAY_SEG(_LCD_4G_1_23A);
+				LCD_DISPLAY_SEG(_LCD_4G_2_23A);
+				break;
+			case 3:
+				LCD_DISPLAY_SEG(_LCD_4G_1_23A);
+				LCD_DISPLAY_SEG(_LCD_4G_2_23A);
+				LCD_DISPLAY_SEG(_LCD_4G_3_23A);
+				break;
+			case 4:
+				LCD_DISPLAY_SEG(_LCD_4G_1_23A);
+				LCD_DISPLAY_SEG(_LCD_4G_2_23A);
+				LCD_DISPLAY_SEG(_LCD_4G_3_23A);
+				LCD_DISPLAY_SEG(_LCD_4G_4_23A);
+				break;
+			case 5:
+				LCD_DISPLAY_SEG(_LCD_4G_1_23A);
+				LCD_DISPLAY_SEG(_LCD_4G_2_23A);
+				LCD_DISPLAY_SEG(_LCD_4G_3_23A);
+				LCD_DISPLAY_SEG(_LCD_4G_4_23A);
+				LCD_DISPLAY_SEG(_LCD_4G_5_23A);
+				break;
+			default:
+				temp_sig = 0;
+				break;
+		}		
+	}
+	else
+	{
+		if(last_wrc_result == PASS)//��һ��ͨѶ����
+		{	
+			LCD_DISPLAY_SEG(_LCD_WIFI_23A);
+			LCD_DISPLAY_SEG(_LCD_4G_1_23A);
+			if(signal_intensity > GMS_WORST)
+				LCD_DISPLAY_SEG(_LCD_4G_2_23A);
+			if(signal_intensity > GMS_POOR)
+				LCD_DISPLAY_SEG(_LCD_4G_3_23A);
+			if(signal_intensity > GMS_GENERAL)
+				LCD_DISPLAY_SEG(_LCD_4G_4_23A);
+			if(signal_intensity > GMS_BEST)
+				LCD_DISPLAY_SEG(_LCD_4G_5_23A);
+		}
+	}
+	
+}
+/*�Ʒ���ʾ*/
+void Lcd_BillingShow(uint8_t bill_mode,uint8_t ladder_now)
+{
+
+	if(bill_mode == BM_DEVICE || bill_mode == BM_PLATFORM){
+		if(bill_mode == BM_PLATFORM)//��̨�Ʒ�ģʽ
+			LCD_DISPLAY_SEG(_LCD_BILLBACK_23A);
+		if(ladder_now > 0)
+			LCD_DISPLAY_SEG(_LCD_LADDERBILL_23A);//���ݼ۸�
+		else
+			LCD_DISPLAY_SEG(_LCD_SINGLEBILL_23A);//��һ�۸�
+	}
+}
+
+
+
+
+
+//void Lcd_SecCorr_ParaShow(PARA_DISPLAY_PAGE sec_corr_fix,SECOND_ORDER_CORR_T * sec_coor_set_p)
+//{
+//	if(sec_corr_fix == SEC_CORR_NOW_PARA_1)
+//	{
+//		Lcd_DisplayFirstLine_23A(1,sec_coor_set_p->second_flow_data_point[0]);
+//		Lcd_DisplaySecondLine_23A(1,sec_coor_set_p->second_corr_factor[0]);
+//	}else if(sec_corr_fix == SEC_CORR_NOW_PARA_2)
+//	{
+//		Lcd_DisplayFirstLine_23A(1,sec_coor_set_p->second_flow_data_point[1]);
+//		Lcd_DisplaySecondLine_23A(1,sec_coor_set_p->second_corr_factor[1]);
+//	}else if(sec_corr_fix == SEC_CORR_NOW_PARA_3)
+//	{
+//		Lcd_DisplayFirstLine_23A(1,sec_coor_set_p->second_flow_data_point[2]);
+//		Lcd_DisplaySecondLine_23A(1,sec_coor_set_p->second_corr_factor[2]);
+//	}else if(sec_corr_fix == SEC_CORR_NOW_PARA_4)
+//	{
+//		Lcd_DisplayFirstLine_23A(1,sec_coor_set_p->second_flow_data_point[3]);
+//		Lcd_DisplaySecondLine_23A(1,sec_coor_set_p->second_corr_factor[3]);
+//	}else if(sec_corr_fix == SEC_CORR_NOW_PARA_5)
+//	{
+//		Lcd_DisplayFirstLine_23A(1,sec_coor_set_p->second_flow_data_point[4]);
+//		Lcd_DisplaySecondLine_23A(1,sec_coor_set_p->second_corr_factor[4]);
+//	}else if(sec_corr_fix == SEC_CORR_OLD_PARA_1)
+//	{
+//		Lcd_DisplayFirstLine_23A(1,sec_coor_set_p->reserve[0]); //����Ԥ��ֵ��oldֵ
+//		Lcd_DisplaySecondLine_23A(1,sec_coor_set_p->reserve[5]);
+//	}else if(sec_corr_fix == SEC_CORR_OLD_PARA_2)
+//	{
+//		Lcd_DisplayFirstLine_23A(1,sec_coor_set_p->reserve[1]);
+//		Lcd_DisplaySecondLine_23A(1,sec_coor_set_p->reserve[6]);
+//	}else if(sec_corr_fix == SEC_CORR_OLD_PARA_3)
+//	{
+//		Lcd_DisplayFirstLine_23A(1,sec_coor_set_p->reserve[2]);
+//		Lcd_DisplaySecondLine_23A(1,sec_coor_set_p->reserve[7]);
+//	}else if(sec_corr_fix == SEC_CORR_OLD_PARA_4)
+//	{
+//		Lcd_DisplayFirstLine_23A(1,sec_coor_set_p->reserve[3]);
+//		Lcd_DisplaySecondLine_23A(1,sec_coor_set_p->reserve[8]);
+//	}else if(sec_corr_fix == SEC_CORR_OLD_PARA_5)
+//	{
+//		Lcd_DisplayFirstLine_23A(1,sec_coor_set_p->reserve[4]);
+//		Lcd_DisplaySecondLine_23A(1,sec_coor_set_p->reserve[9]);
+//	}
+//	
+
+//}

--
Gitblit v1.9.3