|
@@ -235,6 +235,9 @@ void ReadMsgFromLcm(uint8_t* msg, uint8_t readLen)
|
|
|
strcpy((char*)pSysInfo->LcmHwRev, moduleName);
|
|
|
if (key == 0x0014)
|
|
|
_currentPage = *(msg + 8);
|
|
|
+ if (key == 0x0031) {
|
|
|
+ log_info("Get LCM Backlight change to 0x%x", *(msg + 8));
|
|
|
+ }
|
|
|
if (key >= _Touch_IDLE && key <= _Touch_Pay_LinePay) {
|
|
|
|
|
|
_btn_press_id = key;
|
|
@@ -728,26 +731,22 @@ void ChangeToOtherPage(short newPage)
|
|
|
ReadMsgFromLcm(msg, ARRAY_SIZE(msg));
|
|
|
}
|
|
|
|
|
|
-void ChangeBackLight(bool islight)
|
|
|
+void ChangeBackLight(uint8_t value)
|
|
|
{
|
|
|
- uint8_t value = 0x01;
|
|
|
+ //uint8_t value = 0x01;
|
|
|
uint8_t msg[9];
|
|
|
memset(msg, 0x00, sizeof(msg));
|
|
|
|
|
|
- // 0x00 ~ 0x40
|
|
|
- if (islight)
|
|
|
- {
|
|
|
- value = 0x20;
|
|
|
- }
|
|
|
uint8_t cmd[7];
|
|
|
memset(cmd, 0x00, sizeof(cmd));
|
|
|
|
|
|
cmd[0] = CMD_TITLE_1;
|
|
|
cmd[1] = CMD_TITLE_2;
|
|
|
- cmd[2] = 0x03;
|
|
|
- cmd[3] = CMD_READ;
|
|
|
- cmd[4] = CMD_BACKLIGHT;
|
|
|
- cmd[5] = value;
|
|
|
+ cmd[2] = 0x05;
|
|
|
+ cmd[3] = CMD_MULTI_WRITE;
|
|
|
+ cmd[4] = 0x00;
|
|
|
+ cmd[5] = 0x82;
|
|
|
+ cmd[6] = value;
|
|
|
|
|
|
WriteCmdToLcm(cmd, ARRAY_SIZE(cmd));
|
|
|
usleep(10000);
|
|
@@ -1322,9 +1321,11 @@ void ProcessPageInfo()
|
|
|
for (uint8_t i = 0; i < pSysConfig->TotalConnectorCount; i++) {
|
|
|
|
|
|
if (pSysInfo->CurGunSelected == i) {
|
|
|
- pDcChargingInfo = (struct ChargingInfoData *)GetDcChargingInfoData(pSysInfo->CurGunSelected);
|
|
|
- if (pDcChargingInfo->SystemStatus == S_AUTHORIZING) {
|
|
|
+ pDcChargingInfo = (struct ChargingInfoData*)GetDcChargingInfoData(i);
|
|
|
+
|
|
|
+ if (pDcChargingInfo->SystemStatus == S_IDLE) {
|
|
|
_everyPageRollChange = 0;
|
|
|
+ _Text_Running_Count = 1;
|
|
|
}
|
|
|
switch (pSysInfo->SystemPage) {
|
|
|
case _PAGE_IDLE:
|
|
@@ -1354,7 +1355,7 @@ void ProcessPageInfo()
|
|
|
|
|
|
ChangeChargingRateValue((int)ShmDcCommonData->ChargingRate);
|
|
|
ShowAuthorizeCountDown();
|
|
|
- _Text_Running_Count = 1;
|
|
|
+
|
|
|
break;
|
|
|
case _PAGE_SENSING:
|
|
|
if (ShmDcCommonData->TradeCancel == TRUE) {
|
|
@@ -1371,8 +1372,6 @@ void ProcessPageInfo()
|
|
|
ShowLineRegisterCountDown();
|
|
|
break;
|
|
|
case _PAGE_PRECHARGE:
|
|
|
- //ChangeDisplay2Value(_Icon_Precharge,1);
|
|
|
-
|
|
|
RefreshProgressAnimation();
|
|
|
if (_everyPageRollChange == 0) {
|
|
|
ChangeDisplay2Value(_Icon_Precharge,_Text_Running_Count);
|
|
@@ -1765,7 +1764,9 @@ int main(void)
|
|
|
_port = CreateCommunicationLcmPort();
|
|
|
uint8_t changeWarningPriority = 0;
|
|
|
uint8_t curWarningCount = 255;
|
|
|
- ChangeBackLight(true);
|
|
|
+ uint8_t light = 0x64;
|
|
|
+ ShmDcCommonData->BackLight = light;
|
|
|
+ ChangeBackLight(light);
|
|
|
_totalCount = pSysConfig->TotalConnectorCount;
|
|
|
_everyPageRollChange = 0;
|
|
|
//Initialization();
|
|
@@ -1794,6 +1795,11 @@ int main(void)
|
|
|
} else {
|
|
|
UpdateLcmFunction(ShmDcCommonData,_port);
|
|
|
|
|
|
+ if (ShmDcCommonData->BackLight != light) {
|
|
|
+ ChangeBackLight(ShmDcCommonData->BackLight);
|
|
|
+ light = ShmDcCommonData->BackLight;
|
|
|
+ log_info("Set Backlight:%d",light);
|
|
|
+ }
|
|
|
/*
|
|
|
// Warning 處理
|
|
|
if (curWarningCount != pSysWarning->WarningCount) {
|