/*
|
* 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"
|
|
|
|
/*µçÁ¿ÏÔʾ*/
|
void Lcd_Battery(float alka_vcc,float lith_vcc)
|
{
|
// __IO static uint8_t cal_cnt = 0;
|
// LCD_DISPLAY_SEG(_LCD_BATTERY_SHELL_23A); //×ÜÊÇÏÔʾµç³Ø¿Ç
|
// if(sys_display_para_g.sys_and_display_mode != CALIB_MODE)
|
// {
|
// if((calendar_g.Second & 4) == 0) //¼ÆÁ¿³ÖÐø6Ã룬ͨѶ³ÖÐø4Ã룬һ´ÎÑ»·
|
// {
|
// LCD_DISPLAY_SEG(_LCD_METER_23A); //¡°¼ÆÁ¿¡±×Ö·û
|
// if(lith_bat_real_per_g > 0)
|
// LCD_DISPLAY_SEG(_LCD_BATTERY_1_23A);
|
// if(lith_bat_real_per_g > 20)
|
// LCD_DISPLAY_SEG(_LCD_BATTERY_2_23A);
|
// if(lith_bat_real_per_g > 40)
|
// LCD_DISPLAY_SEG(_LCD_BATTERY_3_23A);
|
// if(lith_bat_real_per_g > 70)
|
// LCD_DISPLAY_SEG(_LCD_BATTERY_4_23A);
|
// }
|
// else
|
// {
|
// LCD_DISPLAY_SEG(_LCD_SIGNAL_COMMUNICATION_23A); //¡°Í¨Ñ¶¡±×Ö·û
|
// if(alka_vcc >= 4.5f)
|
// LCD_DISPLAY_SEG(_LCD_BATTERY_1_23A);
|
// if(alka_vcc >= 4.85f)
|
// LCD_DISPLAY_SEG(_LCD_BATTERY_2_23A);
|
// if(alka_vcc >= 5.25f)
|
// LCD_DISPLAY_SEG(_LCD_BATTERY_3_23A);
|
// if(alka_vcc >= 5.65f)
|
// LCD_DISPLAY_SEG(_LCD_BATTERY_4_23A);
|
// }
|
// }else//¼ì¶¨Ä£Ê½ÏÂʵʱʱ¼ä²»¸üУ¬ËùÒÔÒª»»ÖÖ·½Ê½
|
// {
|
// cal_cnt++;
|
// if(cal_cnt <= 24)
|
// {
|
// LCD_DISPLAY_SEG(_LCD_METER_23A); //¡°¼ÆÁ¿¡±×Ö·û
|
//// if(lith_vcc >= 2.9f)
|
//// LCD_DISPLAY_SEG(_LCD_BATTERY_1_23A);
|
//// if(lith_vcc >= 3.2f)
|
//// LCD_DISPLAY_SEG(_LCD_BATTERY_2_23A);
|
//// if(lith_vcc >= 3.3f)
|
//// LCD_DISPLAY_SEG(_LCD_BATTERY_3_23A);
|
//// if(lith_vcc >= 3.4f)
|
//// LCD_DISPLAY_SEG(_LCD_BATTERY_4_23A);
|
// if(lith_bat_real_per_g > 0)
|
// LCD_DISPLAY_SEG(_LCD_BATTERY_1_23A);
|
// if(lith_bat_real_per_g > 20)
|
// LCD_DISPLAY_SEG(_LCD_BATTERY_2_23A);
|
// if(lith_bat_real_per_g > 40)
|
// LCD_DISPLAY_SEG(_LCD_BATTERY_3_23A);
|
// if(lith_bat_real_per_g > 70)
|
// LCD_DISPLAY_SEG(_LCD_BATTERY_4_23A);
|
// }else
|
// {
|
// if(cal_cnt > 40)
|
// cal_cnt = 0;
|
// LCD_DISPLAY_SEG(_LCD_SIGNAL_COMMUNICATION_23A); //¡°Í¨Ñ¶¡±×Ö·û
|
// if(alka_vcc >= 4.5f)
|
// LCD_DISPLAY_SEG(_LCD_BATTERY_1_23A);
|
// if(alka_vcc >= 4.85f)
|
// LCD_DISPLAY_SEG(_LCD_BATTERY_2_23A);
|
// if(alka_vcc >= 5.25f)
|
// LCD_DISPLAY_SEG(_LCD_BATTERY_3_23A);
|
// if(alka_vcc >= 5.65f)
|
// 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,SYS_ALARM_VALVE_T cl_valve_cause,uint8_t valve_lock)
|
//{
|
// static uint8_t show_flag = 0;
|
// switch(valve_state)
|
// {
|
// case VALVE_OP:
|
// LCD_DISPLAY_SEG(_LCD_VALVE_M_23A);
|
// LCD_DISPLAY_SEG(_LCD_OPEN_23A);
|
// break;
|
// case VALVE_CL:
|
// LCD_DISPLAY_SEG(_LCD_VALVE_M_23A);
|
// LCD_DISPLAY_SEG(_LCD_CLOSE_23A);
|
// break;
|
// case VALVE_OPENING:
|
// LCD_DISPLAY_SEG(_LCD_VALVE_M_23A);
|
// show_flag = !show_flag;
|
// if(show_flag)
|
// LCD_DISPLAY_SEG(_LCD_OPEN_23A);
|
// break;
|
// case VALVE_CLOSING:
|
// LCD_DISPLAY_SEG(_LCD_VALVE_M_23A);
|
// show_flag = !show_flag;
|
// if(show_flag)
|
// LCD_DISPLAY_SEG(_LCD_CLOSE_23A);
|
// break;
|
// case VALVE_ERROR:
|
// LCD_DISPLAY_SEG(_LCD_VALVE_M_23A);
|
// break;
|
// default:break;
|
// }
|
// if(valve_lock)
|
// LCD_DISPLAY_SEG(_LCD_LOCK_23A);
|
// if(valve_state == VALVE_CL && (cl_valve_cause <= 0x99))
|
// {
|
//#ifdef LCD_NEW
|
// Lcd_DisplayDigit_23A(1,BCD_2_DECIMAL(cl_valve_cause) / 10);
|
// Lcd_DisplayDigit_23A(2,BCD_2_DECIMAL(cl_valve_cause) % 10);
|
//#else
|
// switch(cl_valve_cause) //ÔÝδÏëºÃÔõô·ÖÀà
|
// {
|
// default:
|
//// Lcd_DisplayDigit_23A(1,5);
|
// break;
|
// }
|
//#endif
|
// }
|
//}
|
|
/*¾¯¸æÏÔʾ*/
|
#define ALARM_ID_SHOW_MAX 5
|
void Lcd_WaringShow_New(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 = AV_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 = AV_NORMAL;
|
// temp_list_cnt_flag = list_cnt;
|
// }
|
// /*±¨¾¯ÏÔʾ*/
|
// if(alarm_id != AV_NORMAL)
|
// {
|
// 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_WarningShow(SYS_ALARM_VALVE_T * warning_state,SYS_ALARM_VALVE_T * clear_state)
|
//{
|
// uint8_t display_alarm_id_bcd = BCD_2_DECIMAL(*warning_state);
|
// //µ±±¨¾¯ÏÔʾºÍÇå³ý±¨¾¯ÏÔʾÏàͬʱ
|
// if(*warning_state == *clear_state && *clear_state != AV_NORMAL)
|
// *warning_state = *clear_state = AV_NORMAL;
|
// if(*warning_state == AV_NORMAL && *clear_state != AV_NORMAL)
|
// *clear_state = AV_NORMAL;
|
// switch(*warning_state)
|
// {
|
// case AV_NORMAL:
|
// case V_KEY_OP: //¾¯¸æÖ»ÓÐÁ½Î»Êý×ÖÏÔʾ
|
// case V_KEY_CL:
|
// case V_GPRS_CMD_OP:
|
// case V_GPRS_CMD_CL:
|
// break;
|
// default:
|
// LCD_DISPLAY_SEG(_LCD_WARNING_23A);
|
// Lcd_DisplayDigit_23A(2,display_alarm_id_bcd / 10);
|
// Lcd_DisplayDigit_23A(3,display_alarm_id_bcd % 10);
|
// break;
|
// }
|
//}
|
/*Ô¶´«ÏÔʾ*/
|
void Lcd_GprsShow(uint8_t gprs_state,uint8_t flag_4g,uint8_t signal_intensity)
|
{
|
// static uint8_t temp_sig = 0;
|
// if(!flag_4g)
|
// LCD_DISPLAY_SEG(_LCD_4G_Flag_23A);
|
// /*ÕýÔÚÉÏ´«Ê±ÏÔʾ*/
|
// if(gprs_soft_para_g.gprs_state != GPRS_IDLE && gprs_soft_para_g.gprs_state != GPRS_RESTART)
|
// {
|
// 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(!gprs_state)//ÉÏÒ»´ÎͨѶÕý³£
|
// {
|
// 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_flag,uint8_t bill_mode,uint8_t price_mode)
|
{
|
// if(bill_flag)//ÓмƷÑ
|
// {
|
// if(bill_mode)//ºǫ́¼Æ·Ñģʽ
|
// LCD_DISPLAY_SEG(_LCD_BILLBACK_23A);
|
// if(price_mode == SPM_LADDER)
|
// 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]);
|
// }
|
//
|
|
//}
|