Эх сурвалжийг харах

2022-3-18 / Simon Xue

Action:
1. [bug] Rededuct will cancel trade when preauthcomplete fail.
2. [bug] LCM not change which not get final cost. Until gun plugout.

Files
As the following commit history files

Image Version: V2.09.XX.XXXX.XX
Simon Xue 3 жил өмнө
parent
commit
d70e54e61e

+ 2 - 1
EVSE/Projects/DD360Tcci/Apps/CSU/RFID.c

@@ -418,7 +418,8 @@ void ReDeductProcess(int fd)
                 break;
             }
             log_info("Start Rededuct item [%d]",j);
-            if (deductInfo[j].isIntoCharge == FALSE || deductInfo[j].Energy == 0) {
+            if (deductInfo[j].isIntoCharge == FALSE ||
+                (deductInfo[j].Energy == 0 && deductInfo[j].Amount == 0)) {
                 // 未進入充電或度數等於零
                 result = CreditCardPreAuthCancel(fd, PREAUTHMONEY, &pSysConfig->ModelName[0],
                     &deductInfo[j].pCreditCard.ApprovalNo[0],

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

@@ -81,8 +81,8 @@ uint8_t bd0_2_status = 0;
 uint8_t bd1_1_status = 0;
 uint8_t bd1_2_status = 0;
 
-char *fwVersion = "V2.08.00.0000.00"; // Phihong version
-char* DebugVersion = "v2.08.03";      // Software debug version
+char *fwVersion = "V2.09.00.0000.00"; // Phihong version
+char* DebugVersion = "v2.09.00";      // Software debug version
 //sqlite3 *localDb;
 bool isDb_ready;
 
@@ -2668,7 +2668,7 @@ void CreateTimeoutFork(void)
                 if (pDcChargingInfo->TimeoutFlag != 0)
                 log_info("Timeout ***********GunTimeoutFlag = %d(%d) ********",pDcChargingInfo->TimeoutFlag,
                         GetTimeoutValue(pDcChargingInfo->TimeoutTimer) / uSEC_VAL);
-                        */
+                */        
                 switch (pDcChargingInfo->TimeoutFlag) {
                 case Timeout_WaitPlug:
                     if (GetTimeoutValue(pDcChargingInfo->TimeoutTimer) / uSEC_VAL >= _connectionTimeout) {
@@ -3436,8 +3436,8 @@ void TheEndCharging(uint8_t gunIndex)
     }
 
     pDcChargingInfo->isRemoteStart = NO;
-
-    StopGunInfoTimeoutDet(gunIndex);
+    if (pDcChargingInfo->TimeoutFlag != Timeout_FinalCost)
+        StopGunInfoTimeoutDet(gunIndex);
     //StartGunInfoTimeoutDet(gunIndex, Timeout_EvseCompleteDet);
     ChangeStartOrStopDateTime(NO, gunIndex);
     DB_Insert_Record(gunIndex);

+ 4 - 1
EVSE/Projects/DD360Tcci/Apps/DataBase/DataBase.c

@@ -702,7 +702,10 @@ int DB_GetMultiDeductInfo(int deductResult, int uploadState, int *gunIndex, Reco
                 deductInfo[idxRow - 1].DeductResult = atoi(rs[(idxRow * cols) + 12]);
                 deductInfo[idxRow - 1].isIntoCharge = atoi(rs[(idxRow * cols) + 13]);
                 deductInfo[idxRow - 1].IsUpload = atoi(rs[(idxRow * cols) + 14]);
-                deductInfo[idxRow - 1].RedeductTime = atoi(rs[(idxRow * cols) + 15]);
+                // 15: LineSN
+                deductInfo[idxRow - 1].Energy = atof(rs[(idxRow * cols) + 16]);
+                deductInfo[idxRow - 1].RedeductTime = atoi(rs[(idxRow * cols) + 17]);
+                log_info("Retry time:%d", deductInfo[idxRow - 1].RedeductTime);
                 if(idxRow >= 128)
                 {
                 	rows = 128;

+ 5 - 5
EVSE/Projects/DD360Tcci/Apps/ModuleLcmCtrl/Lcm_Update.c

@@ -294,14 +294,14 @@ int downloadBIN(uint8_t targetAddr, char *filename)
             // Transfer data to ram
             for(uint16_t idxSrcData=0;idxSrcData<(((blocklSize%pageSize)==0)?(blocklSize/pageSize):(blocklSize/pageSize)+1);idxSrcData++)
             {
-                //log_info("Buffer start data address: 0x%08X\n", (idxBinSrc*blocklSize)+(idxSrcData*pageSize));
-                //log_info("  Image start ram address: 0x%08X\n", ((idxSrcData*pageSize) >> 1));
+                log_info("Buffer start data address: 0x%08X\n", (idxBinSrc*blocklSize)+(idxSrcData*pageSize));
+                log_info("  Image start ram address: 0x%08X\n", ((idxSrcData*pageSize) >> 1));
                 if((idxSrcData+1) != (((blocklSize%pageSize)==0)?(blocklSize/pageSize):(blocklSize/pageSize)+1))
                 {
                     // Data transfer
                     while(lcdRegisterWrite(_port, REG_TYPE_RAM, bufferRamAddr+((idxSrcData*pageSize)>>1), &buf[(idxBinSrc*blocklSize)+(idxSrcData*pageSize)], pageSize) != PASS)
                     {
-                        log_info("Transfer data to ram 0x%04X fail.\n", transferedByte);
+                        //log_info("Transfer data to ram 0x%04X fail.\n", transferedByte);
                     }
                     transferedByte += pageSize;
                 }
@@ -310,7 +310,7 @@ int downloadBIN(uint8_t targetAddr, char *filename)
                     // Last data transfer
                     while(lcdRegisterWrite(_port, REG_TYPE_RAM, bufferRamAddr+((idxSrcData*pageSize)>>1), &buf[(idxBinSrc*blocklSize)+(idxSrcData*pageSize)], (blocklSize-(idxSrcData*pageSize)))!= PASS)
                     {
-                        log_info("Transfer data to ram 0x%04X fail.\n", transferedByte);
+                        //log_info("Transfer data to ram 0x%04X fail.\n", transferedByte);
                     }
                     transferedByte += (blocklSize-(idxSrcData*pageSize));
                 }
@@ -322,7 +322,7 @@ int downloadBIN(uint8_t targetAddr, char *filename)
             {
                 log_info("Save bin file to 0x%04X fail.\n", ((targetAddr*8)+idxBinSrc));
             }
-            //log_info("Save bin file on 0x%04X success.\n", ((targetAddr*8)+idxBinSrc));
+            log_info("Save bin file on 0x%04X success.\n", ((targetAddr*8)+idxBinSrc));
             sleep(1);
         }
     }

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


BIN
EVSE/Projects/DD360Tcci/output/Module_DoComm


BIN
EVSE/Projects/DD360Tcci/output/Module_EventLogging


BIN
EVSE/Projects/DD360Tcci/output/Module_LcmControl


BIN
EVSE/Projects/DD360Tcci/output/main