瀏覽代碼

2020-06-16 / Eason Yang
1.Change : main.c.
Reason :
a) Rename : version
b) Added : check ChargingProfileReq != ON
c) Fixed : StartPeriod must > 0
2.Change : Module_InternalComm.c.
Reason :
a) Rename : CMD_CONFIG_MCU_MODE -> CMD_CONFIG_LEGACY_REQUEST
3.Change : Module_InternalComm.h.
Reason :
a) Rename : CMD_CONFIG_MCU_MODE -> CMD_CONFIG_LEGACY_REQUEST
Version : B0.48.XX.XXXX.XX

8009 4 年之前
父節點
當前提交
0302e0bc05

+ 1 - 1
EVSE/Projects/AW-Regular/Apps/Module_InternalComm.c

@@ -1286,7 +1286,7 @@ unsigned char Config_AC_MCU_LEGACY_REQUEST(unsigned char fd, unsigned char targe
 	tx[0] = 0xaa;
 	tx[1] = 0x00;
 	tx[2] = targetAddr;
-	tx[3] = CMD_CONFIG_MCU_MODE;
+	tx[3] = CMD_CONFIG_LEGACY_REQUEST;
 	tx[4] = 0x02;
 	tx[5] = 0x00;
 	tx[6] = Set_Buf->isLegacyRequest;

+ 1 - 1
EVSE/Projects/AW-Regular/Apps/Module_InternalComm.h

@@ -44,7 +44,7 @@ enum MESSAGE_COMMAND
 	CMD_CONFIG_RTC = 0x87,
 	CMD_CONFIG_AC_LED = 0x88,
 	CMD_CONFIG_CURRENT_LINIT = 0x89,
-	CMD_CONFIG_MCU_MODE = 0x8A,
+	CMD_CONFIG_LEGACY_REQUEST = 0x8A,
 	CMD_CONFIG_MCU_RESET_REQUEST = 0x8C,
 	CMD_CONFIG_MCU_SET_BREATHE_LED_TIMING = 0x8D,
 	CMD_CONFIG_MCU_SET_LED_BRIGHTNESS = 0x8E,

+ 6 - 5
EVSE/Projects/AW-Regular/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.47.00.0000.00");
+	sprintf((char*)ShmSysConfigAndInfo->SysInfo.CsuRootFsFwRev, "B0.48.00.0000.00");
 
 	// Get AC connector type from model name
 	for(uint8_t idx=0;idx<3;idx++)
@@ -2572,6 +2572,7 @@ int main(void)
 
 						// Checking profile id > 0 and current time is between charging profile validFrom & validTo
 						if((ShmOCPP16Data->SmartChargingProfile[gun_index].ChargingProfileId>0) &&
+						   (ShmOCPP16Data->CSUMsg.bits[gun_index].ChargingProfileReq != ON) &&
 						   (((strlen((char*)ShmOCPP16Data->SmartChargingProfile[gun_index].ValidFrom)>0) && (strlen((char*)ShmOCPP16Data->SmartChargingProfile[gun_index].ValidTo)>0)) ? isProfileValid(gun_index) : ON))
 						{
 							// Debug information
@@ -2599,7 +2600,7 @@ int main(void)
 									for(uint8_t idx_period=0;idx_period<ARRAY_SIZE(ShmOCPP16Data->SmartChargingProfile[gun_index].ChargingSchedule.ChargingSchedulePeriod);idx_period++)
 									{
 										if((getScheduleStart(gun_index) > ShmOCPP16Data->SmartChargingProfile[gun_index].ChargingSchedule.ChargingSchedulePeriod[idx_period].StartPeriod) &&
-										   (((ShmOCPP16Data->SmartChargingProfile[gun_index].ChargingSchedule.ChargingSchedulePeriod[idx_period].StartPeriod == 0) && (ShmOCPP16Data->SmartChargingProfile[gun_index].ChargingSchedule.ChargingSchedulePeriod[idx_period].Limit != 0)) || (ShmOCPP16Data->SmartChargingProfile[gun_index].ChargingSchedule.ChargingSchedulePeriod[idx_period].StartPeriod != 0)))
+										   (((ShmOCPP16Data->SmartChargingProfile[gun_index].ChargingSchedule.ChargingSchedulePeriod[idx_period].StartPeriod == 0) && (ShmOCPP16Data->SmartChargingProfile[gun_index].ChargingSchedule.ChargingSchedulePeriod[idx_period].Limit != 0)) || (ShmOCPP16Data->SmartChargingProfile[gun_index].ChargingSchedule.ChargingSchedulePeriod[idx_period].StartPeriod > 0)))
 										{
 											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);
@@ -2619,7 +2620,7 @@ int main(void)
 									for(uint8_t idx_period=0;idx_period<ARRAY_SIZE(ShmOCPP16Data->SmartChargingProfile[gun_index].ChargingSchedule.ChargingSchedulePeriod);idx_period++)
 									{
 										if((ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PresentChargedDuration > ShmOCPP16Data->SmartChargingProfile[gun_index].ChargingSchedule.ChargingSchedulePeriod[idx_period].StartPeriod) &&
-										   (((ShmOCPP16Data->SmartChargingProfile[gun_index].ChargingSchedule.ChargingSchedulePeriod[idx_period].StartPeriod == 0) && (ShmOCPP16Data->SmartChargingProfile[gun_index].ChargingSchedule.ChargingSchedulePeriod[idx_period].Limit != 0)) || (ShmOCPP16Data->SmartChargingProfile[gun_index].ChargingSchedule.ChargingSchedulePeriod[idx_period].StartPeriod != 0)))
+										   (((ShmOCPP16Data->SmartChargingProfile[gun_index].ChargingSchedule.ChargingSchedulePeriod[idx_period].StartPeriod == 0) && (ShmOCPP16Data->SmartChargingProfile[gun_index].ChargingSchedule.ChargingSchedulePeriod[idx_period].Limit != 0)) || (ShmOCPP16Data->SmartChargingProfile[gun_index].ChargingSchedule.ChargingSchedulePeriod[idx_period].StartPeriod > 0)))
 										{
 											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);
@@ -2641,7 +2642,7 @@ int main(void)
 										for(uint8_t idx_period=0;idx_period<ARRAY_SIZE(ShmOCPP16Data->SmartChargingProfile[gun_index].ChargingSchedule.ChargingSchedulePeriod);idx_period++)
 										{
 											if((getStartSinceToday() > ShmOCPP16Data->SmartChargingProfile[gun_index].ChargingSchedule.ChargingSchedulePeriod[idx_period].StartPeriod) &&
-											   (((ShmOCPP16Data->SmartChargingProfile[gun_index].ChargingSchedule.ChargingSchedulePeriod[idx_period].StartPeriod == 0) && (ShmOCPP16Data->SmartChargingProfile[gun_index].ChargingSchedule.ChargingSchedulePeriod[idx_period].Limit != 0)) || (ShmOCPP16Data->SmartChargingProfile[gun_index].ChargingSchedule.ChargingSchedulePeriod[idx_period].StartPeriod != 0)))
+											   (((ShmOCPP16Data->SmartChargingProfile[gun_index].ChargingSchedule.ChargingSchedulePeriod[idx_period].StartPeriod == 0) && (ShmOCPP16Data->SmartChargingProfile[gun_index].ChargingSchedule.ChargingSchedulePeriod[idx_period].Limit != 0)) || (ShmOCPP16Data->SmartChargingProfile[gun_index].ChargingSchedule.ChargingSchedulePeriod[idx_period].StartPeriod > 0)))
 											{
 												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);
@@ -2656,7 +2657,7 @@ int main(void)
 										for(uint8_t idx_period=0;idx_period<ARRAY_SIZE(ShmOCPP16Data->SmartChargingProfile[gun_index].ChargingSchedule.ChargingSchedulePeriod);idx_period++)
 										{
 											if((getStartSinceWeek() > ShmOCPP16Data->SmartChargingProfile[gun_index].ChargingSchedule.ChargingSchedulePeriod[idx_period].StartPeriod) &&
-											   (((ShmOCPP16Data->SmartChargingProfile[gun_index].ChargingSchedule.ChargingSchedulePeriod[idx_period].StartPeriod == 0) && (ShmOCPP16Data->SmartChargingProfile[gun_index].ChargingSchedule.ChargingSchedulePeriod[idx_period].Limit != 0)) || (ShmOCPP16Data->SmartChargingProfile[gun_index].ChargingSchedule.ChargingSchedulePeriod[idx_period].StartPeriod != 0)))
+											   (((ShmOCPP16Data->SmartChargingProfile[gun_index].ChargingSchedule.ChargingSchedulePeriod[idx_period].StartPeriod == 0) && (ShmOCPP16Data->SmartChargingProfile[gun_index].ChargingSchedule.ChargingSchedulePeriod[idx_period].Limit != 0)) || (ShmOCPP16Data->SmartChargingProfile[gun_index].ChargingSchedule.ChargingSchedulePeriod[idx_period].StartPeriod > 0)))
 											{
 												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);

二進制
EVSE/Projects/AW-Regular/Images/FactoryDefaultConfig.bin


二進制
EVSE/Projects/AW-Regular/Images/MLO


二進制
EVSE/Projects/AW-Regular/Images/ramdisk.gz


二進制
EVSE/Projects/AW-Regular/Images/u-boot.img


二進制
EVSE/Projects/AW-Regular/Images/zImage


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

@@ -1 +1 @@
-6
+7

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

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

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

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