|
@@ -4,7 +4,7 @@
|
|
|
//==========================
|
|
|
// System basic sample constant
|
|
|
//==========================
|
|
|
-#define ARRAY_SIZE(A) (sizeof(A) / sizeof(A[0]))
|
|
|
+#define ARRAY_SIZE(A) (sizeof(A) / sizeof(A[0]))
|
|
|
#define PASS 1
|
|
|
#define FAIL -1
|
|
|
#define YES 1
|
|
@@ -31,7 +31,7 @@
|
|
|
#define TIMEOUT_SPEC_AUTH 30000
|
|
|
#define TIMEOUT_SPEC_HANDSHAKING_LED 185000
|
|
|
|
|
|
-#define MtdBlockSize 0x600000
|
|
|
+#define MtdBlockSize 0x600000
|
|
|
|
|
|
//==========================
|
|
|
// Declare method
|
|
@@ -392,6 +392,7 @@ int CreatShareMemory()
|
|
|
|
|
|
return result;
|
|
|
}
|
|
|
+
|
|
|
//======================================================
|
|
|
// Peripheral initial
|
|
|
//======================================================
|
|
@@ -896,7 +897,7 @@ void get_firmware_version(unsigned char gun_index)
|
|
|
}
|
|
|
|
|
|
// Get CSU root file system version
|
|
|
- sprintf((char*)ShmSysConfigAndInfo->SysInfo.CsuRootFsFwRev, "D0.02.40.0007.PH");
|
|
|
+ sprintf((char*)ShmSysConfigAndInfo->SysInfo.CsuRootFsFwRev, "D0.03.40.0007.PH");
|
|
|
|
|
|
// Get MCU firmware version
|
|
|
strcpy((char*)ShmSysConfigAndInfo->SysInfo.CsuPrimFwRev, ShmCharger->gun_info[gun_index].ver.Version_FW);
|
|
@@ -964,6 +965,7 @@ int upgrade_check()
|
|
|
ShmCharger->gun_info[gun_index].mcuFlag.isMcuUpgradeReq = ON;
|
|
|
break;
|
|
|
default:
|
|
|
+ result = FAIL;
|
|
|
DEBUG_WARN("Image file is unknown type.\r\n");
|
|
|
sprintf(cmd, "yes|rm %s", ShmCharger->fwUpgradeInfo.location);
|
|
|
system(cmd);
|
|
@@ -1951,6 +1953,9 @@ int main(void)
|
|
|
ShmOCPP16Data->StopTransaction[gun_index].MeterStop = ((float)ShmCharger->gun_info[gun_index].powerConsumption.power_consumption/100.0) - ShmOCPP16Data->StartTransaction[gun_index].MeterStart;
|
|
|
ftime(&endChargingTime[gun_index]);
|
|
|
ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PresentChargedDuration = DiffTimeb(startChargingTime[gun_index], endChargingTime[gun_index]);
|
|
|
+
|
|
|
+ // Charging profile
|
|
|
+
|
|
|
}
|
|
|
|
|
|
break;
|
|
@@ -2092,6 +2097,7 @@ int main(void)
|
|
|
{
|
|
|
DEBUG_INFO("Firmware remote upgraded fail...\r\n");
|
|
|
ShmOCPP16Data->MsMsg.bits.UpdateFirmwareReq = OFF;
|
|
|
+ ShmCharger->isUpdateSuccess = FAIL;
|
|
|
}
|
|
|
else if(strcmp((char*)ShmOCPP16Data->FirmwareStatusNotification.Status, "Downloaded")==0)
|
|
|
{
|