Browse Source

2020-06-09 / Eason Yang
1.Charge: main.c Reason: Added break. if cant find ChargeProfile period, the system should break logic.
Version : B0.31.XX.XXXX.XX

8009 4 years ago
parent
commit
fe7a97c1a1

+ 9 - 2
EVSE/Projects/BYTON-GB/Apps/main.c

@@ -1181,7 +1181,7 @@ void get_firmware_version(unsigned char gun_index)
 	strcpy((char*)ShmSysConfigAndInfo->SysInfo.CsuPrimFwRev, ShmCharger->gun_info[gun_index].ver.Version_FW);
 
 	// Get CSU root file system version
-	sprintf((char*)ShmSysConfigAndInfo->SysInfo.CsuRootFsFwRev, "B0.30.00.0000.00");
+	sprintf((char*)ShmSysConfigAndInfo->SysInfo.CsuRootFsFwRev, "B0.31.00.0000.00");
 
 	// Get AC connector type from model name
 	for(uint8_t idx=0;idx<3;idx++)
@@ -2699,6 +2699,8 @@ int main(void)
 											ShmCharger->gun_info[gun_index].targetCurrent = (mystrcmp((char*)ShmOCPP16Data->SmartChargingProfile[gun_index].ChargingSchedule.ChargingRateUnit,"W")==PASS?ShmOCPP16Data->SmartChargingProfile[gun_index].ChargingSchedule.ChargingSchedulePeriod[idx_period].Limit/220:ShmOCPP16Data->SmartChargingProfile[gun_index].ChargingSchedule.ChargingSchedulePeriod[idx_period].Limit);
 											DEBUG_INFO("ShmCharger->gun_info[%d].targetCurrent on period[%d]: %d\r\n", gun_index, idx_period, ShmCharger->gun_info[gun_index].targetCurrent);
 										}
+										else
+											break;
 									}
 								}
 							}
@@ -2717,6 +2719,8 @@ int main(void)
 											ShmCharger->gun_info[gun_index].targetCurrent = (mystrcmp((char*)ShmOCPP16Data->SmartChargingProfile[gun_index].ChargingSchedule.ChargingRateUnit,"W")==PASS?ShmOCPP16Data->SmartChargingProfile[gun_index].ChargingSchedule.ChargingSchedulePeriod[idx_period].Limit/220:ShmOCPP16Data->SmartChargingProfile[gun_index].ChargingSchedule.ChargingSchedulePeriod[idx_period].Limit);
 											DEBUG_INFO("ShmCharger->gun_info[%d].targetCurrent on period[%d]: %d\r\n", gun_index, idx_period, ShmCharger->gun_info[gun_index].targetCurrent);
 										}
+										else
+											break;
 									}
 								}
 							}
@@ -2737,6 +2741,8 @@ int main(void)
 												ShmCharger->gun_info[gun_index].targetCurrent = (mystrcmp((char*)ShmOCPP16Data->SmartChargingProfile[gun_index].ChargingSchedule.ChargingRateUnit,"W")==PASS?ShmOCPP16Data->SmartChargingProfile[gun_index].ChargingSchedule.ChargingSchedulePeriod[idx_period].Limit/220:ShmOCPP16Data->SmartChargingProfile[gun_index].ChargingSchedule.ChargingSchedulePeriod[idx_period].Limit);
 												DEBUG_INFO("ShmCharger->gun_info[%d].targetCurrent on period[%d]: %d\r\n", gun_index, idx_period, ShmCharger->gun_info[gun_index].targetCurrent);
 											}
+											else
+												break;
 										}
 									}
 									else
@@ -2750,6 +2756,8 @@ int main(void)
 												ShmCharger->gun_info[gun_index].targetCurrent = (mystrcmp((char*)ShmOCPP16Data->SmartChargingProfile[gun_index].ChargingSchedule.ChargingRateUnit,"W")==PASS?ShmOCPP16Data->SmartChargingProfile[gun_index].ChargingSchedule.ChargingSchedulePeriod[idx_period].Limit/220:ShmOCPP16Data->SmartChargingProfile[gun_index].ChargingSchedule.ChargingSchedulePeriod[idx_period].Limit);
 												DEBUG_INFO("ShmCharger->gun_info[%d].targetCurrent on period[%d]: %d\r\n", gun_index, idx_period, ShmCharger->gun_info[gun_index].targetCurrent);
 											}
+											else
+												break;
 										}
 									}
 								}
@@ -2807,7 +2815,6 @@ int main(void)
 						}
 						else
 						{
-
 							// Off-line max condition check
 							if((ShmSysConfigAndInfo->SysConfig.AuthorisationMode == AUTH_MODE_DISABLE) ||
 							   ((ShmSysConfigAndInfo->SysConfig.AuthorisationMode == AUTH_MODE_ENABLE) && (ShmSysConfigAndInfo->SysConfig.OfflinePolicy != OFF_POLICY_NOCHARGE)) ||

BIN
EVSE/Projects/BYTON-GB/Images/FactoryDefaultConfig.bin


BIN
EVSE/Projects/BYTON-GB/Images/MLO


BIN
EVSE/Projects/BYTON-GB/Images/ramdisk.gz


BIN
EVSE/Projects/BYTON-GB/Images/u-boot.img


BIN
EVSE/Projects/BYTON-GB/Images/zImage


+ 1 - 5
board-support/linux-4.9.59+gitAUTOINC+a75d8e9305-ga75d8e9305/.version

@@ -1,5 +1 @@
-<<<<<<< HEAD
-2
-=======
-3
->>>>>>> 498327a05107f52072488cdeb109679906436825
+1

+ 3 - 4
board-support/linux-4.9.59+gitAUTOINC+a75d8e9305-ga75d8e9305/arch/arm/boot/dts/.am335x-evm.dtb.dts.tmp

@@ -1444,7 +1444,6 @@
                 compatible = "nxp,pcf85063";
                 reg = <0x51>;
         };
-
 };
 
 &usb {
@@ -1479,7 +1478,7 @@
 &elm {
  status = "okay";
 };
-# 403 "arch/arm/boot/dts/am335x-evm.dts"
+# 402 "arch/arm/boot/dts/am335x-evm.dts"
 &gpmc {
  status = "okay";
  pinctrl-names = "default", "sleep";
@@ -1665,7 +1664,7 @@
   };
  };
 };
-# 509 "arch/arm/boot/dts/am335x-evm.dts" 2
+# 508 "arch/arm/boot/dts/am335x-evm.dts" 2
 
 &tps {
  vcc1-supply = <&vbat>;
@@ -1764,7 +1763,7 @@
   phy-mode = "mii";
 
 };
-# 615 "arch/arm/boot/dts/am335x-evm.dts"
+# 614 "arch/arm/boot/dts/am335x-evm.dts"
 &tscadc {
  status = "okay";
 

+ 0 - 1
board-support/linux-4.9.59+gitAUTOINC+a75d8e9305-ga75d8e9305/arch/arm/boot/dts/am335x-evm.dts

@@ -344,7 +344,6 @@
                 compatible = "nxp,pcf85063";
                 reg = <0x51>;
         };
-
 };
 #endif
 &usb {