Parcourir la source

2022-07-28 / Simon Xue

Action:
1. [Mod] Can't start Auth when pressing credit card pay button.
2. [Mod] Current select not auto set when enter EV_Preparing status
3. [Mod] Default prices and Carbon set show float.
4. [Mod] Reservation page make sure 3 sec timeout.

Files
As the following commit history files

Image Version:V2.16.XX.XXXX.XX
Simon Xue il y a 2 ans
Parent
commit
e08703701b

+ 2 - 2
EVSE/Projects/DD360Tcci/Apps/CSU/main.c

@@ -83,7 +83,7 @@ uint8_t bd1_1_status = 0;
 uint8_t bd1_2_status = 0;
 
 char *fwVersion = "V2.16.00.0000.00"; // Phihong version
-char* DebugVersion = "V2.16.00";      // Software debug version
+char* DebugVersion = "V2.16.03";      // Software debug version
 //sqlite3 *localDb;
 bool isDb_ready;
 
@@ -4540,7 +4540,7 @@ int main(void)
                                  waitLeftGunPlugIt(gunIndex) == PASS)
                            ) {
                             log_info("-------- RFID/Auto Start(%d) --------", gunIndex);
-                            ChangeGunSelectByIndex(gunIndex);
+                            //ChangeGunSelectByIndex(gunIndex);
                             //AddPlugInTimes(gunIndex);
                             pDcChargingInfo->isRemoteStart = NO;
                             strcpy((char *)pDcChargingInfo->StartUserId, (char *)pSysConfig->UserId);

+ 2 - 0
EVSE/Projects/DD360Tcci/Apps/ModuleEvComm/Module_EvRxComm.c

@@ -424,9 +424,11 @@ void CANReceiver(int fd)
                     } else {
                         log_info("Conn %d, None Check. (%d) ", targetGun, frame.data[0]);
                     }
+                    /*
                     if(pDcChargingInfo->RemoteStartFlag == YES) {
                         pSysInfo->CurGunSelected = targetGun;
                     }
+                    */
                 }
 
                 pDcChargingInfo->PilotVoltage = frame.data[1];

+ 12 - 8
EVSE/Projects/DD360Tcci/Apps/ModuleLcmCtrl/Module_LcmControl.c

@@ -475,17 +475,18 @@ void CheckDonateNo()
 void CheckPayCreditCard()
 {
     //ShmDcCommonData->LineStatus[pSysInfo->CurGunSelected] = 0;
+    pDcChargingInfo = (struct ChargingInfoData*)GetDcChargingInfoData(pSysInfo->CurGunSelected);
     // 使用者進入線上支付,禁止使用者使用刷卡機
-    if (ShmDcCommonData->TransactionInfo[pSysInfo->CurGunSelected].LineStatus == _LINE_PAY_OPERATE) {
+    if (ShmDcCommonData->TransactionInfo[pSysInfo->CurGunSelected].LineStatus == _LINE_PAY_OPERATE ||
+        pDcChargingInfo->SystemStatus == S_RESERVATION ) {
         pSysInfo->SystemPage = _PAGE_LINEPAYING;
         StartSystemTimeoutDet(Timeout_LINEPAYING);
-        log_info("Some one operate LINE PAY");
+        log_info("Some one online operate");
         return;
     }
     ShmDcCommonData->TradeCancel = FALSE;
-   	pDcChargingInfo = (struct ChargingInfoData *)GetDcChargingInfoData(pSysInfo->CurGunSelected);
 
-	if ((pDcChargingInfo->SystemStatus == S_IDLE || pDcChargingInfo->SystemStatus == S_RESERVATION ) &&
+	if ((pDcChargingInfo->SystemStatus == S_IDLE ) &&
         pSysInfo->SystemPage == _PAGE_SELECT_PAY &&
         ShmDcCommonData->PreAuth_Config == _CREDITCARD_IDLE) {
         ShmDcCommonData->PreAuth_Config = _CREDITCARD_PREAUTH;
@@ -1063,14 +1064,14 @@ void ChangeChargingPowerValue(float pow)
     string2ByteArray(value, cmd);
     DisplayValueToLcm(_String_ChargePower, cmd, sizeof(cmd));
 }
-void ChangeChargingRateValue(int rate)
+void ChangeChargingRateValue(float rate)
 {
     uint8_t cmd[10];
     uint8_t value[10];
 
     memset(cmd, 0x00, sizeof(cmd));
     
-    sprintf((char *) value, "%d",rate);
+    sprintf((char *) value, "%.1f",rate);
     string2ByteArray(value, cmd);
     DisplayValueToLcm(_String_ChargeRate, cmd, sizeof(cmd));
 }
@@ -1095,7 +1096,7 @@ void ChangeCarBonValue(float data)
     _carbon = data * 0.577;
     //log_info("Carbon:%d",(int)_carbon);
 
-	sprintf((char *) value, "%d", (int)_carbon);
+	sprintf((char *) value, "%.1f", _carbon);
     string2ByteArray(value, cmd);
     DisplayValueToLcm(_String_Carbon, cmd, sizeof(cmd));
 }
@@ -1384,7 +1385,7 @@ void ProcessPageInfo()
             case _PAGE_AUTHORIZE:
                 StartSystemTimeoutDet(Timeout_ScanCard);
 
-		        ChangeChargingRateValue((int)ShmDcCommonData->ChargingRate);
+		        ChangeChargingRateValue(ShmDcCommonData->ChargingRate);
                 ShowAuthorizeCountDown();
 
                 break;
@@ -1858,6 +1859,9 @@ int main(void)
             }
             
             ShmStatusCodeData->AlarmCode.AlarmEvents.bits.LcmModuleCommFail = false;
+            if (pSysInfo->SystemPage == _PAGE_LINEPAYING) {
+                StartSystemTimeoutDet(Timeout_LINEPAYING);
+            }
 
             // 頁面資訊處理
             if (!ShmDcCommonData->lcmtest)

BIN
EVSE/Projects/DD360Tcci/Images/ramdisk.gz


BIN
EVSE/Projects/DD360Tcci/output/Module_EvComm


BIN
EVSE/Projects/DD360Tcci/output/Module_LcmControl


BIN
EVSE/Projects/DD360Tcci/output/main