浏览代码

2022-07-15 / Wendell

Actions
1. set start transaction flag after remote start for tcc customer code
2. modify running cost logic
3. modify relay upgrade logic
4. modify subVersion to 03

Files
1. As follow commit history

Image version : V2.03.XX.XXXX.XX
Wendell 2 年之前
父节点
当前提交
80c8cde241
共有 3 个文件被更改,包括 26 次插入4 次删除
  1. 26 4
      EVSE/Projects/DO360/Apps/main.c
  2. 二进制
      EVSE/Projects/DO360/Images/FactoryDefaultConfig.bin
  3. 二进制
      EVSE/Projects/DO360/Images/ramdisk.gz

+ 26 - 4
EVSE/Projects/DO360/Apps/main.c

@@ -112,6 +112,7 @@
 #define     CONTACTOR_AUTO_ON_TIME      60
 #define     CONTACTOR_AUTO_OFF_TIME     300
 #define     WAIT_DISPENSER_STOP_TIMEOUT 3               // unit: second
+#define     STARTTRANSATION_TIME        1
 
 char 	*valid_Internet[2] 	  = {"8.8.8.8", "180.76.76.76"};
 unsigned char mask_table[] = { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80 };
@@ -428,7 +429,7 @@ bool isModelNameMatch = true;
 //char* rfidPortName = "/dev/ttyS2";
 #if ENABLE_PCBA_TEST == 0
 char* fwVersion = "V2.03.00.0000.00";
-char* subVersion = "02";
+char* subVersion = "03";
 #else
 char* fwVersion = "PCBA.00.04";
 char* subVersion = "00";
@@ -5887,8 +5888,11 @@ char CheckUpdateProcess()
                                     retFail++;
                                 }
                                 LOG_INFO("Upgrade %s", isPass == PASS ? "Success" : "Fail");
-                                sleep(3);
-                                isPass = Upgrade_UART(uartFd, Type, UPGRADE_DORC2, new_str, (char *)ShmSysConfigAndInfo->SysConfig.ModelName);
+                                if(ShmChargerInfo->Control.SysCtrl.bits.SecondRelayBoardEnable)
+                                {
+                                    sleep(3);
+                                    isPass = Upgrade_UART(uartFd, Type, UPGRADE_DORC2, new_str, (char *)ShmSysConfigAndInfo->SysConfig.ModelName);
+                                }
                             }
                             else
                             {
@@ -6638,7 +6642,7 @@ void RunningCostHandler(void)
         if(strlen((char *)strCost) > 0)
         {
             if(ShmSysConfigAndInfo->SysInfo.ConnectorInfo[i].GeneralChargingData.SystemStatus >= S_REASSIGN_CHECK &&
-                ShmSysConfigAndInfo->SysInfo.ConnectorInfo[i].GeneralChargingData.SystemStatus <= S_ALARM)
+                ShmSysConfigAndInfo->SysInfo.ConnectorInfo[i].GeneralChargingData.SystemStatus <= S_CHARGING)
             {
                 RunningCostParsing(i, strCost);
             }
@@ -7502,6 +7506,11 @@ void UpdateChargingTimestamp(char *timestamp)
 
 void OcppStartTransaction(byte gunIndex)
 {
+    if(_triggerTransaction[gunIndex])
+    {
+        return;
+    }
+
     // clean deduct info
     Clean_DeductInfo(gunIndex);
     // set deduct user id
@@ -10515,6 +10524,16 @@ int main(void)
                         GetClockTime(&_ConnectorAuthorizing_Time[gun_index]);
                     }
 
+                    if(!_triggerTransaction[gun_index] &&
+                        ShmChargerInfo->Control.CustomerCode == _CUSTOMER_CODE_TCC &&
+                        ShmSysConfigAndInfo->SysInfo.ConnectorInfo[gun_index].AuthInfo.AuthType == _AuthType_RemoteStart)
+                    {
+                        if(GetTimeoutValue(_ConnectorAuthorizing_Time[gun_index]) / uSEC_VAL >= STARTTRANSATION_TIME)
+                        {
+                            OcppStartTransaction(gun_index);
+                        }
+                    }
+
                     if(GetTimeoutValue(_ConnectorAuthorizing_Time[gun_index]) / uSEC_VAL >= FORCE_BALANCE_TIME)
                     {
                         FouceAnnounceAccountBalance(gun_index);
@@ -10547,6 +10566,7 @@ int main(void)
                         {
                             LOG_INFO("*********** Gun %d Preparing State Timeout ***********", gun_index + 1);
                         }
+                        OcppStopTransaction(gun_index);
                         setChargerMode(gun_index, MODE_IDLE);
                     }
                     else
@@ -10565,11 +10585,13 @@ int main(void)
                             ShmSysConfigAndInfo->SysInfo.ConnectorInfo[gun_index].Parameter.bits.NeedCleanAuthorizeInfo = false;
 
                             LOG_INFO("*********** Gun %d User Stop Plug In ***********", gun_index + 1);
+                            OcppStopTransaction(gun_index);
                             setChargerMode(gun_index, MODE_IDLE);
                         }
                         else if(isEvBoardStopChargeFlag(gun_index) == YES)
                         {
                             LOG_INFO("********** Gun %d Alarm Stop (S_AUTHORIZING) **********", gun_index + 1);
+                            OcppStopTransaction(gun_index);
                             setChargerMode(gun_index, MODE_IDLE);
                         }
                     }

二进制
EVSE/Projects/DO360/Images/FactoryDefaultConfig.bin


二进制
EVSE/Projects/DO360/Images/ramdisk.gz