Forráskód Böngészése

2022-10-18 / Wendell

Actions
1. [mod] add delay time between derating completed and extend capability
2. [mod] PRECHARGE_RANGE_VOLTAGE 20V
3. [add] Precharge Log
4. modify subVersion to 03

Files
1. As follow commit history

Image version : V2.04.XX.XXXX.XX
Wendell 2 éve
szülő
commit
6a33fcaa57

+ 21 - 8
EVSE/Projects/DO360/Apps/Module_PsuComm.c

@@ -42,9 +42,10 @@
 #define MAX_PSU_POWER_OFF_CURRENT       50          // unit: 0.1A, 5A
 #define MAX_PSU_POWER_OFF_VOLTAGE       100         // unit: 0.1A, 10V
 #define PRECHARGE_OFFSET_VOLTAGE        20          // unit: 0.1V, 2V
-#define PRECHARGE_RANGE_VOLTAGE         100         // unit: 0.1V, 10V
+#define PRECHARGE_RANGE_VOLTAGE         200         // unit: 0.1V, 10V
 #define WAIT_PRECHARGE_TIME             10          // unit: second
 #define EXTEND_CAPABILITY_DELAY         30          // unit: second
+#define EXTEND_AFTER_DERATING_DELAY     3           // unit: second
 #define EXTEND_LOADING                  8000        // unit: 0.01%, 80%
 #define RELEASE_LOADING                 5000        // unit: 0.01%, 50%
 #define RELEASE_LOADING_OFFSET          1000        // unit: 0.01%, 10%
@@ -3158,6 +3159,8 @@ void CheckSmoothDerating(unsigned char master)
 
 void CheckReleaseOrExtend(unsigned char master)
 {
+    int time = 0;
+
     if((ShmChargerInfo->Control.TestCtrl.bits.ChargingSimulation || Is_EnableReleaseAndExtendWhenForceCharging(master)) &&
         ShmPsuGrouping->GroupCollection[master].GroupCtrl.RoleCtrl.DeratingCtrlValue == 0 &&
         ShmPsuGrouping->GroupCollection[master].GroupCtrl.RoleCtrl.ExtendCapabilityCtrlValue == 0)
@@ -3185,16 +3188,24 @@ void CheckReleaseOrExtend(unsigned char master)
         else if(ShmPsuGrouping->GroupCollection[master].DiffPower_Capability <= MAX_DIFF_POWER_TO_EXTEND &&
             ShmPsuGrouping->GroupCollection[master].DiffPower_PhysicalLimit >= MIN_DIFF_PHYSICAL_POWER)
         {
-            int available = GetPsuGroupAvailable(master);
+            time = GetTimeoutValue(_ExtendCapability_time[master]) / uSEC_VAL;
 
-            if(available > 0)
+            if(time >= EXTEND_AFTER_DERATING_DELAY)
             {
-                if(!ShmPsuGrouping->GroupCollection[master].GroupCtrl.bits.ExtendAvailable)
+                int available = GetPsuGroupAvailable(master);
+
+                if(available > 0)
                 {
-                    LOG_INFO("Gun %d Extend Capability Available", master + 1);
-                    GetClockTime(&_ExtendCapability_time[master]);
+                    if(!ShmPsuGrouping->GroupCollection[master].GroupCtrl.bits.ExtendAvailable)
+                    {
+                        LOG_INFO("Gun %d Extend Capability Available, DifPcap: %.1f kW, DifPphy: %.1f",
+                            master + 1,
+                            ShmPsuGrouping->GroupCollection[master].DiffPower_Capability,
+                            ShmPsuGrouping->GroupCollection[master].DiffPower_PhysicalLimit);
+                        GetClockTime(&_ExtendCapability_time[master]);
+                    }
+                    ShmPsuGrouping->GroupCollection[master].GroupCtrl.bits.ExtendAvailable = true;
                 }
-                ShmPsuGrouping->GroupCollection[master].GroupCtrl.bits.ExtendAvailable = true;
             }
         }
     }
@@ -4122,6 +4133,7 @@ void PsuGroupDeratingProcess(unsigned char master)
     {
         ShmPsuGrouping->GroupCollection[master].GroupCtrl.RoleCtrl.DeratingCtrlValue = 0;
         UpdateGunAvailableCapability(master);
+        GetClockTime(&_ExtendCapability_time[master]);
         LOG_INFO("Gun %d Derating Completed", master + 1);
     }
 }
@@ -4778,7 +4790,8 @@ void PsuGroupControlProcess(void)
                 if(ShmPsuGrouping->GroupCollection[group].PreRole != role)
                 {
                     ShmPsuGrouping->GroupCollection[group].PreRole = role;
-                    PSU_LOG("===== PSU Group[%02X] ===== Extend Stop", group);
+                    PSU_LOG("===== PSU Group[%02X] ===== Extend Stop, %d.%d V",
+                        group, (ShmPsuData->PsuGroup[group].GroupPresentOutputVoltage / 10), (ShmPsuData->PsuGroup[group].GroupPresentOutputVoltage % 10));
                     GetClockTime(&_PsuGroupRole_time[group]);
                 }
 

+ 1 - 1
EVSE/Projects/DO360/Apps/main.c

@@ -422,7 +422,7 @@ bool isModelNameMatch = true;
 //char* rfidPortName = "/dev/ttyS2";
 #if ENABLE_PCBA_TEST == 0
 char* fwVersion = "V2.04.00.0000.00";
-char* subVersion = "01";
+char* subVersion = "03";
 #else
 char* fwVersion = "PCBA.00.04";
 char* subVersion = "00";

BIN
EVSE/Projects/DO360/Images/FactoryDefaultConfig.bin


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