115 lines
6.4 KiB
C++
115 lines
6.4 KiB
C++
#pragma once
|
|
#include <map>
|
|
#include <vector>
|
|
#include "HgLCDfont.h"
|
|
|
|
enum class DisType{
|
|
Dis_Unkown,
|
|
Dis_Init,//启动欢迎界面
|
|
Dis_Welcome,
|
|
Dis_Idel,//就绪
|
|
Dis_Scan,
|
|
Dis_Err_JamIn,
|
|
Dis_Err_DoubleFeed,
|
|
Dis_Err_PaperScrew,
|
|
Dis_Err_Stable,
|
|
Dis_Err_AqrImgTimeout,
|
|
Dis_Err_CoverOpen,
|
|
Dis_Err_JamOut,
|
|
Dis_Err_HandModeJam,
|
|
Dis_Err_FeedError,
|
|
Dis_Err_NoPaper,
|
|
Dis_Err_DogEar,
|
|
Dis_Err_Size,
|
|
Dis_Set_PollPaperIntensity,
|
|
Dis_Set_PollPI_High,
|
|
Dis_Set_PollPI_Mid,
|
|
Dis_Set_PollPI_Low,
|
|
Dis_Count_Page,
|
|
Dis_Scan_Page,
|
|
Dis_Set_ClearPaperPass,
|
|
Dis_Set_Count,
|
|
Dis_Set_SleepMode,
|
|
Dis_Set_SleepMode_5M,
|
|
Dis_Set_SleepMode_10M,
|
|
Dis_Set_SleepMode_20M,
|
|
Dis_Set_SleepMode_30M,
|
|
Dis_Set_SleepMode_1H,
|
|
Dis_Set_SleepMode_2H,
|
|
Dis_Set_SleepMode_4H,
|
|
Dis_Set_SleepMode_NEVER,
|
|
Dis_Set_Poweroff,
|
|
Dis_Set_Return,
|
|
Dis_HandMode,
|
|
Dis_Set_Item_Return,
|
|
Dis_Set_TrayPosition,
|
|
Dis_Set_TrayPosition_Low,
|
|
Dis_Set_TrayPosition_Mid,
|
|
Dis_Set_TrayPosition_High,
|
|
Dis_Device_Lock,
|
|
};
|
|
|
|
enum class DisDrawtype
|
|
{
|
|
DD_All,
|
|
DD_TopLeft,
|
|
DD_BotRight
|
|
};
|
|
|
|
enum class ClearScreen
|
|
{
|
|
All,
|
|
TOP,
|
|
BOT,
|
|
};
|
|
|
|
struct DisInfo{
|
|
unsigned char page;
|
|
unsigned char col;
|
|
DisDrawtype drawtype;
|
|
std::vector<unsigned char> str;
|
|
};
|
|
|
|
static std::map<DisType,DisInfo> map_Display={
|
|
{DisType::Dis_Welcome,{1,1,DisDrawtype::DD_All,std::vector<unsigned char>(f_logo,f_logo+sizeof(f_logo))}},
|
|
{DisType::Dis_Init,{1,1,DisDrawtype::DD_All,std::vector<unsigned char>(f_welcome,f_welcome+sizeof(f_welcome))}},
|
|
{DisType::Dis_Idel,{1,1,DisDrawtype::DD_TopLeft,std::vector<unsigned char>(f_ready,f_ready+sizeof(f_ready))}},
|
|
{DisType::Dis_Scan,{1,1,DisDrawtype::DD_TopLeft,std::vector<unsigned char>(f_scan,f_scan+sizeof(f_scan))}},
|
|
{DisType::Dis_Set_ClearPaperPass,{1,1,DisDrawtype::DD_TopLeft,std::vector<unsigned char>(f_clearpaperpass,f_clearpaperpass+sizeof(f_clearpaperpass))}},
|
|
{DisType::Dis_Set_Count,{1,1,DisDrawtype::DD_TopLeft,std::vector<unsigned char>(f_countmode,f_countmode+sizeof(f_countmode))}},
|
|
{DisType::Dis_Err_DoubleFeed,{1,1,DisDrawtype::DD_TopLeft,std::vector<unsigned char>(f_doublefeed,f_doublefeed+sizeof(f_doublefeed))}},
|
|
{DisType::Dis_Err_Stable,{1,1,DisDrawtype::DD_TopLeft,std::vector<unsigned char>(f_stable,f_stable+sizeof(f_stable))}},
|
|
{DisType::Dis_Err_CoverOpen,{1,1,DisDrawtype::DD_TopLeft,std::vector<unsigned char>(f_coveropen,f_coveropen+sizeof(f_coveropen))}},
|
|
{DisType::Dis_Err_JamIn,{1,1,DisDrawtype::DD_TopLeft,std::vector<unsigned char>(f_paperjam,f_paperjam+sizeof(f_paperjam))}},
|
|
{DisType::Dis_Err_JamOut,{1,1,DisDrawtype::DD_TopLeft,std::vector<unsigned char>(f_paperjam,f_paperjam+sizeof(f_paperjam))}},
|
|
{DisType::Dis_Err_HandModeJam,{1,1,DisDrawtype::DD_TopLeft,std::vector<unsigned char>(f_handmodepaperjam,f_handmodepaperjam+sizeof(f_handmodepaperjam))}},
|
|
{DisType::Dis_Err_PaperScrew,{1,1,DisDrawtype::DD_TopLeft,std::vector<unsigned char>(f_paperscrew,f_paperscrew+sizeof(f_paperscrew))}},
|
|
{DisType::Dis_Err_FeedError,{1,1,DisDrawtype::DD_TopLeft,std::vector<unsigned char>(f_feederror,f_feederror+sizeof(f_feederror))}},
|
|
{DisType::Dis_Err_AqrImgTimeout,{1,1,DisDrawtype::DD_TopLeft,std::vector<unsigned char>(f_aqrimgtimeout,f_aqrimgtimeout+sizeof(f_aqrimgtimeout))}},
|
|
{DisType::Dis_Err_DogEar,{1,1,DisDrawtype::DD_TopLeft,std::vector<unsigned char>(f_dogear,f_dogear+sizeof(f_dogear))}},
|
|
{DisType::Dis_Err_Size,{1,1,DisDrawtype::DD_TopLeft,std::vector<unsigned char>(f_size,f_size+sizeof(f_size))}},
|
|
{DisType::Dis_Set_PollPaperIntensity,{1,1,DisDrawtype::DD_TopLeft,std::vector<unsigned char>(f_pollpaperintensity,f_pollpaperintensity+sizeof(f_pollpaperintensity))}},
|
|
{DisType::Dis_Set_PollPI_High,{3,96,DisDrawtype::DD_BotRight,std::vector<unsigned char>(f_intensityHigh,f_intensityHigh+sizeof(f_intensityHigh))}},
|
|
{DisType::Dis_Set_PollPI_Mid,{3,96,DisDrawtype::DD_BotRight,std::vector<unsigned char>(f_intensityMid,f_intensityMid+sizeof(f_intensityMid))}},
|
|
{DisType::Dis_Set_PollPI_Low,{3,96,DisDrawtype::DD_BotRight,std::vector<unsigned char>(f_intensityLow,f_intensityLow+sizeof(f_intensityLow))}},
|
|
|
|
{DisType::Dis_Set_TrayPosition,{1,1,DisDrawtype::DD_TopLeft,std::vector<unsigned char>(f_trayposition,f_trayposition+sizeof(f_trayposition))}},
|
|
{DisType::Dis_Set_TrayPosition_High,{3,96,DisDrawtype::DD_BotRight,std::vector<unsigned char>(f_intensityHigh,f_intensityHigh+sizeof(f_intensityHigh))}},
|
|
{DisType::Dis_Set_TrayPosition_Mid,{3,96,DisDrawtype::DD_BotRight,std::vector<unsigned char>(f_intensityMid,f_intensityMid+sizeof(f_intensityMid))}},
|
|
{DisType::Dis_Set_TrayPosition_Low,{3,96,DisDrawtype::DD_BotRight,std::vector<unsigned char>(f_traypositionLow,f_traypositionLow+sizeof(f_traypositionLow))}},
|
|
|
|
{DisType::Dis_Count_Page,{3,112,DisDrawtype::DD_BotRight,std::vector<unsigned char>(f_page,f_page+sizeof(f_page))}},
|
|
{DisType::Dis_Scan_Page,{3,112,DisDrawtype::DD_BotRight,std::vector<unsigned char>(f_page,f_page+sizeof(f_page))}},
|
|
{DisType::Dis_Err_NoPaper,{1,1,DisDrawtype::DD_TopLeft,std::vector<unsigned char>(f_nopaper,f_nopaper+sizeof(f_nopaper))}},
|
|
{DisType::Dis_Set_SleepMode,{1,1,DisDrawtype::DD_TopLeft,std::vector<unsigned char>(f_sleepmode,f_sleepmode+sizeof(f_sleepmode))}},
|
|
// {DisType::Dis_Set_SleepMode_30M,{3,64,DisDrawtype::DD_BotRight,std::vector<unsigned char>(f_30min,f_30min+sizeof(f_30min))}},
|
|
// {DisType::Dis_Set_SleepMode_1H,{3,80,DisDrawtype::DD_BotRight,std::vector<unsigned char>(f_1hour,f_1hour+sizeof(f_1hour))}},
|
|
// {DisType::Dis_Set_SleepMode_2H,{3,80,DisDrawtype::DD_BotRight,std::vector<unsigned char>(f_2hour,f_2hour+sizeof(f_2hour))}},
|
|
{DisType::Dis_Set_SleepMode_NEVER,{3,80,DisDrawtype::DD_BotRight,std::vector<unsigned char>(f_never,f_never+sizeof(f_never))}},
|
|
{DisType::Dis_Set_Return,{1,1,DisDrawtype::DD_TopLeft,std::vector<unsigned char>(f_return,f_return+sizeof(f_return))}},
|
|
{DisType::Dis_Set_Poweroff,{1,1,DisDrawtype::DD_TopLeft,std::vector<unsigned char>(f_powerof,f_powerof+sizeof(f_powerof))}},
|
|
{DisType::Dis_HandMode,{1,1,DisDrawtype::DD_TopLeft,std::vector<unsigned char>(f_handmode,f_handmode+sizeof(f_handmode))}},
|
|
{DisType::Dis_Set_Item_Return,{3,96,DisDrawtype::DD_BotRight,std::vector<unsigned char>(f_return,f_return+sizeof(f_return))}},
|
|
{DisType::Dis_Device_Lock,{1,1,DisDrawtype::DD_TopLeft,std::vector<unsigned char>(f_deviceLock,f_deviceLock+sizeof(f_deviceLock))}},
|
|
};
|