NULL
This commit is contained in:
125
user/Interface/Display.c
Executable file
125
user/Interface/Display.c
Executable file
@@ -0,0 +1,125 @@
|
||||
#include "../main/SystemInclude.h"
|
||||
//==============================================================================
|
||||
|
||||
//##############################################################################
|
||||
#ifndef ENABLE_LCD_DISPLAY
|
||||
#pragma message("[undefined] ENABLE_LCD_DISPLAY")
|
||||
#elif(ENABLE_LCD_DISPLAY)
|
||||
//##############################################################################
|
||||
|
||||
unsigned int displayBit;
|
||||
|
||||
/******************************************************************************/
|
||||
// Numeric preparation for output and display
|
||||
void NumericPrepForOutputAndDisplay(void)
|
||||
{
|
||||
if(currentMode.Bit.TurnOffSystem)
|
||||
{
|
||||
ClearDisplay();
|
||||
return;
|
||||
}
|
||||
|
||||
FlowrateDisplay(flowDisUnit);
|
||||
TotalFlowRateDisplay(AccDisUnit);
|
||||
TemperatureDisplay(voltageDetected[TPCB]);
|
||||
ErrorDisplay(alarmState);
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
#ifndef ENABLE_PRESSURE
|
||||
#pragma message("[undefined] ENABLE_PRESSURE")
|
||||
#elif(ENABLE_PRESSURE)
|
||||
PressDisplay();
|
||||
#else
|
||||
if(currentMode.Bit.ZeroCalib) ZeroCalibDisplay();
|
||||
else if(currentMode.Bit.DebugMode) DebugDisplay();
|
||||
else if(currentMode.Bit.CalibMode) CalibrationDisplay();
|
||||
else if((alarmState & HARD_ALARM) == HARD_ALARM) HardWareAlarmInfo(alarmState);
|
||||
else if(systemAlarm.Bit.GasChange) GasChangeDisplay();
|
||||
else CommAddrDisplay(localAddress);
|
||||
#endif
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
BatteryGridDisplay(batteryGrid);
|
||||
//LcdModeInit();
|
||||
LcdWriteDisplay();
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
void AlarmFlashDisplay(void)
|
||||
{
|
||||
//ClearACCDisplay();
|
||||
//ErrorDisplay(alarmState);
|
||||
//------------------------------------------------------------------------------
|
||||
#ifndef ENABLE_LEAK_DETECT
|
||||
#pragma message("[undefined] ENABLE_LEAK_DETECT")
|
||||
#elif(ENABLE_LEAK_DETECT)
|
||||
if((alarmState1 & LEAK_ALARM) == LEAK_ALARM)
|
||||
{
|
||||
ClearDisplay();
|
||||
OtherAlarmInfo(alarmState1);
|
||||
LcdWriteDisplay();
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#ifndef ENABLE_AUTO_CALIB_ATYPE_OFFSET
|
||||
#pragma message("[undefined] ENABLE_AUTO_CALIB_ATYPE_OFFSET")
|
||||
#elif(ENABLE_AUTO_CALIB_ATYPE_OFFSET)
|
||||
if(userInitial == NEED_FOR_INIT)
|
||||
{
|
||||
NoIniFlashDisplayFlowRate();
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
ClearErrorDisplay(alarmState);
|
||||
LcdWriteDisplay();
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
//void ZeroFlowrateDisplay(void)
|
||||
//{
|
||||
// SetFlowDisplayToZero();
|
||||
// TotalFlowRateDisplay();
|
||||
// BatteryGridDisplay(batteryGrid);
|
||||
// TemperatureDisplay(voltageDetected[TPCB]);
|
||||
// ErrorDisplay(alarmState);
|
||||
//
|
||||
// if((alarmState & HARD_ALARM) == HARD_ALARM) HardWareAlarmInfo(alarmState);
|
||||
// else if(systemAlarm.Bit.GasChange) GasChangeDisplay();
|
||||
// else CommAddrDisplay(localAddress);
|
||||
//
|
||||
// LcdModeInit();
|
||||
// LcdWriteDisplay();
|
||||
//}
|
||||
|
||||
//******************************************************************************
|
||||
//void AlarmFlashDisplay(void)
|
||||
//{
|
||||
// ClearErrorDisplay(alarmState);
|
||||
// LcdWriteDisplay();
|
||||
//}
|
||||
|
||||
//******************************************************************************
|
||||
void DisplayInit(void)
|
||||
{
|
||||
LcdModeInit();
|
||||
DisplayAll();
|
||||
delay_ms(1500);
|
||||
ClearDisplay();
|
||||
delay_ms(1000);
|
||||
|
||||
MeterInfoDisplay();
|
||||
//delay_ms(3000);
|
||||
|
||||
//delay_ms(500);
|
||||
//ClearDisplay();
|
||||
//NumericPrepForOutputAndDisplay();
|
||||
}
|
||||
|
||||
|
||||
//##############################################################################
|
||||
#endif
|
||||
//##############################################################################
|
||||
|
||||
Reference in New Issue
Block a user