Browse Source

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
4.Change : Module_FactoryConfig.c
Reason
a) Fixed : offlinePolicy set to 0 Local list
Version : B0.37.XX.XXXX.XX

8009 4 years ago
parent
commit
b3bd07a420

+ 1 - 1
EVSE/Projects/Noodoe/Apps/Module_FactoryConfig.c

@@ -281,7 +281,7 @@ int main(int argc, char *argv[])
 
 	// Backend configuration
 	SysConfig.BackendConnTimeout=300; 		// 300 seconds
-	SysConfig.OfflinePolicy = 2;			// 0: local list, 1: Phihong RFID tag, 2: free charging, 3: no charging
+	SysConfig.OfflinePolicy = 0;			// 0: local list, 1: Phihong RFID tag, 2: free charging, 3: no charging
 	SysConfig.OfflineMaxChargeEnergy = 0;	// 0: Same as MaxChargeEnergy	Other: 1~65535KWH
 	SysConfig.OfflineMaxChargeDuration = 0; // 0: Same as MaxChargeDuration Other: 1~65535 minutes
 	strcpy((char*)SysConfig.OcppServerURL, "");

+ 1 - 1
EVSE/Projects/Noodoe/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/Noodoe/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/Noodoe/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.36.00.0000.00");
+	sprintf((char*)ShmSysConfigAndInfo->SysInfo.CsuRootFsFwRev, "B0.37.00.0000.00");
 
 	// Get AC connector type from model name
 	for(uint8_t idx=0;idx<3;idx++)
@@ -2583,6 +2583,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
@@ -2610,7 +2611,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);
@@ -2630,7 +2631,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);
@@ -2652,7 +2653,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);
@@ -2667,7 +2668,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);

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


BIN
EVSE/Projects/Noodoe/Images/MLO


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


BIN
EVSE/Projects/Noodoe/Images/u-boot-spl.bin


BIN
EVSE/Projects/Noodoe/Images/u-boot.img


BIN
EVSE/Projects/Noodoe/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 {