/*
|
* 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; //±¨¾¯ÏÔʾµÄ³¤¶È£¬ÓÃÓÚ²éÕÒÁ´±íÖеı¨¾¯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]);
|
// }
|
//
|
|
//}
|