#include "HardwareInfo.c"
#include "JMLib.c"
#include <SetLCDBack.h>
#include <SetLCDString.h>
#include <GetDCIR.h>
#include <SetTenthS.h>

// define global var
unsigned int Var0 = 0;

int main(void)
{
    X4RCU_Init();
    SetLCDBack(1);
    SetLCDString(0, 0, "IR_STATUS", YELLOW, BLACK);
    while (1)
    {
        Var0 = GetDCIR(_FLAMEDETECT_1_);
        if ( Var0<=500 )
        {
            SetLCDString(112, 0, "Short Detect", YELLOW, BLACK);
        }
        else
        {
            if ( Var0>=1000&&Var0<=2000 )
            {
                SetLCDString(112, 0, "Long Detect", YELLOW, BLACK);
            }
            else
            {
                SetLCDString(112, 0, "Not Detect", YELLOW, BLACK);
            }
        }
        SetTenthS(3);
        SetLCDString(112, 0, "Short Detect", YELLOW, BLACK);
    }
    while(1);
}

