|
@@ -157,6 +157,7 @@ void split(char **arr, char *str, const char *del)
|
|
|
//==========================================
|
|
|
void page_booting()
|
|
|
{
|
|
|
+ DEBUG_INFO("Page booting.\n");
|
|
|
switch(ShmSysConfigAndInfo->SysConfig.DefaultLanguage)
|
|
|
{
|
|
|
case LCD_LANG_CHT:
|
|
@@ -182,6 +183,8 @@ void page_booting()
|
|
|
|
|
|
void page_idle()
|
|
|
{
|
|
|
+ uint8_t qrcontent[196];
|
|
|
+ DEBUG_INFO("Page idle.\n");
|
|
|
switch(ShmSysConfigAndInfo->SysConfig.DefaultLanguage)
|
|
|
{
|
|
|
case LCD_LANG_CHT:
|
|
@@ -199,15 +202,30 @@ void page_idle()
|
|
|
case LCD_LANG_THAI:
|
|
|
case LCD_LANG_ENGLISH:
|
|
|
default:
|
|
|
+ // Display QR code by call display picture
|
|
|
dispGraphicArea(Uart1Fd, AREAD_ID_0, YES, 4, 8, 64, 64, IMG_ADDR_QRCODE);
|
|
|
- dispGraphicArea(Uart1Fd, AREAD_ID_1, YES, 70, 18, 70+48, 18+38, IMG_ADDR_TAP_RFID);
|
|
|
|
|
|
+ // Display QR code by LCD built-in function
|
|
|
+ if(ShmSysConfigAndInfo->SysConfig.QRCodeMadeMode)
|
|
|
+ {
|
|
|
+ // Customization content
|
|
|
+ qrCodeOperation(Uart1Fd, 4, 8, ShmSysConfigAndInfo->SysConfig.QRCodeContent, strlen((char*)ShmSysConfigAndInfo->SysConfig.QRCodeContent));
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ // Default content model name & serial number
|
|
|
+ sprintf((char*)qrcontent, "%s%s", ShmSysConfigAndInfo->SysConfig.ModelName, ShmSysConfigAndInfo->SysConfig.SerialNumber);
|
|
|
+ qrCodeOperation(Uart1Fd, 4, 8, qrcontent, strlen((char*)qrcontent));
|
|
|
+ }
|
|
|
+
|
|
|
+ dispGraphicArea(Uart1Fd, AREAD_ID_1, YES, 70, 18, 70+48, 18+38, IMG_ADDR_TAP_RFID);
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
void page_authorizing()
|
|
|
{
|
|
|
+ DEBUG_INFO("Page authorizing.\n");
|
|
|
switch(ShmSysConfigAndInfo->SysConfig.DefaultLanguage)
|
|
|
{
|
|
|
case LCD_LANG_CHT:
|
|
@@ -235,6 +253,7 @@ void page_preparing()
|
|
|
{
|
|
|
static uint8_t idxPage = 0;
|
|
|
|
|
|
+ DEBUG_INFO("Page preparing.\n");
|
|
|
switch(ShmSysConfigAndInfo->SysConfig.DefaultLanguage)
|
|
|
{
|
|
|
case LCD_LANG_CHT:
|
|
@@ -266,6 +285,7 @@ void page_charging()
|
|
|
static uint8_t idxBatt = 0;
|
|
|
static uint8_t idxPage = 0;
|
|
|
|
|
|
+ DEBUG_INFO("Page charging.\n");
|
|
|
switch(ShmSysConfigAndInfo->SysConfig.DefaultLanguage)
|
|
|
{
|
|
|
case LCD_LANG_CHT:
|
|
@@ -329,6 +349,7 @@ void page_complete()
|
|
|
uint8_t buf[128];
|
|
|
static uint8_t idxPage = 0;
|
|
|
|
|
|
+ DEBUG_INFO("Page complete.\n");
|
|
|
switch(ShmSysConfigAndInfo->SysConfig.DefaultLanguage)
|
|
|
{
|
|
|
case LCD_LANG_CHT:
|
|
@@ -384,6 +405,7 @@ void page_terminating()
|
|
|
uint8_t buf[128];
|
|
|
static uint8_t idxPage = 0;
|
|
|
|
|
|
+ DEBUG_INFO("Page terminating.\n");
|
|
|
switch(ShmSysConfigAndInfo->SysConfig.DefaultLanguage)
|
|
|
{
|
|
|
case LCD_LANG_CHT:
|
|
@@ -438,6 +460,7 @@ void page_alarm()
|
|
|
{
|
|
|
uint8_t buf[128];
|
|
|
|
|
|
+ DEBUG_INFO("Page alarm.\n");
|
|
|
switch(ShmSysConfigAndInfo->SysConfig.DefaultLanguage)
|
|
|
{
|
|
|
case LCD_LANG_CHT:
|
|
@@ -466,6 +489,7 @@ void page_fault()
|
|
|
{
|
|
|
uint8_t buf[128];
|
|
|
|
|
|
+ DEBUG_INFO("Page fault.\n");
|
|
|
switch(ShmSysConfigAndInfo->SysConfig.DefaultLanguage)
|
|
|
{
|
|
|
case LCD_LANG_CHT:
|
|
@@ -492,6 +516,7 @@ void page_fault()
|
|
|
|
|
|
void page_maintain()
|
|
|
{
|
|
|
+ DEBUG_INFO("Page maintain.\n");
|
|
|
switch(ShmSysConfigAndInfo->SysConfig.DefaultLanguage)
|
|
|
{
|
|
|
case LCD_LANG_CHT:
|
|
@@ -517,6 +542,7 @@ void page_maintain()
|
|
|
|
|
|
void page_update()
|
|
|
{
|
|
|
+ DEBUG_INFO("Page update.\n");
|
|
|
switch(ShmSysConfigAndInfo->SysConfig.DefaultLanguage)
|
|
|
{
|
|
|
case LCD_LANG_CHT:
|
|
@@ -542,6 +568,7 @@ void page_update()
|
|
|
|
|
|
void page_reservation()
|
|
|
{
|
|
|
+ DEBUG_INFO("Page reservation.\n");
|
|
|
switch(ShmSysConfigAndInfo->SysConfig.DefaultLanguage)
|
|
|
{
|
|
|
case LCD_LANG_CHT:
|
|
@@ -565,6 +592,7 @@ void page_reservation()
|
|
|
|
|
|
void page_booking()
|
|
|
{
|
|
|
+ DEBUG_INFO("Page booking.\n");
|
|
|
switch(ShmSysConfigAndInfo->SysConfig.DefaultLanguage)
|
|
|
{
|
|
|
case LCD_LANG_CHT:
|
|
@@ -588,6 +616,7 @@ void page_booking()
|
|
|
|
|
|
void page_debug()
|
|
|
{
|
|
|
+ DEBUG_INFO("Page debug.\n");
|
|
|
switch(ShmSysConfigAndInfo->SysConfig.DefaultLanguage)
|
|
|
{
|
|
|
case LCD_LANG_CHT:
|
|
@@ -613,6 +642,7 @@ void page_debug()
|
|
|
|
|
|
void page_unknown()
|
|
|
{
|
|
|
+ DEBUG_INFO("Page unknown.\n");
|
|
|
switch(ShmSysConfigAndInfo->SysConfig.DefaultLanguage)
|
|
|
{
|
|
|
case LCD_LANG_CHT:
|
|
@@ -640,6 +670,7 @@ void page_header()
|
|
|
{
|
|
|
uint8_t buf[128];
|
|
|
|
|
|
+ DEBUG_INFO("Page heading.\n");
|
|
|
if(sysFlag.isEnable4G)
|
|
|
{
|
|
|
// Drawing 4G signal strength
|
|
@@ -719,7 +750,7 @@ void page_header()
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- dispCharacterArea(Uart1Fd, AREAD_ID_HEADER_PRICE, 0, 0, 30, 7, FONT_ASCII_4X6, (uint8_t*)"", strlen(""));
|
|
|
+ dispCharacterArea(Uart1Fd, AREAD_ID_HEADER_PRICE, 0, 0, 30, 7, FONT_ASCII_4X6, (uint8_t*)" ", strlen(" "));
|
|
|
}
|
|
|
|
|
|
//dispCharacterConfig(Uart1Fd, AREAD_ID_HEADER, YES, 0, 0, 30, 7);
|
|
@@ -838,8 +869,18 @@ int InitLcdModule()
|
|
|
uint16_t dataMaxLen = 512;
|
|
|
uint8_t qrcontent[196];
|
|
|
|
|
|
- sprintf((char*)qrcontent, "%s%s", ShmSysConfigAndInfo->SysConfig.ModelName, ShmSysConfigAndInfo->SysConfig.SerialNumber);
|
|
|
- qrcode_initText(&qrcode, qrcodeData, SIZE_53X53, 0, (char*)qrcontent);
|
|
|
+ if(ShmSysConfigAndInfo->SysConfig.QRCodeMadeMode)
|
|
|
+ {
|
|
|
+ // Customization content
|
|
|
+ qrcode_initText(&qrcode, qrcodeData, SIZE_53X53, 0, (char*)ShmSysConfigAndInfo->SysConfig.QRCodeContent);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ // Default content model name & serial number
|
|
|
+ sprintf((char*)qrcontent, "%s%s", ShmSysConfigAndInfo->SysConfig.ModelName, ShmSysConfigAndInfo->SysConfig.SerialNumber);
|
|
|
+ qrcode_initText(&qrcode, qrcodeData, SIZE_53X53, 0, (char*)qrcontent);
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
// Power on LCD
|
|
|
setPower(Uart1Fd, ON);
|
|
@@ -1113,7 +1154,6 @@ int main(void)
|
|
|
{
|
|
|
// Clear screen
|
|
|
clearScreen(Uart1Fd, NO, 0, 0, 128, 64);
|
|
|
-
|
|
|
previousMode = ShmSysConfigAndInfo->SysInfo.AcChargingData[ShmCharger->gun_selectd].SystemStatus;
|
|
|
previousLan = ShmSysConfigAndInfo->SysConfig.DefaultLanguage;
|
|
|
}
|