|
@@ -1372,11 +1372,13 @@ int isReservationExpired(unsigned char gun_index)
|
|
|
{
|
|
|
expiredTime.time = mktime(&expiredDate);
|
|
|
|
|
|
- if(DiffTimebWithNow(expiredTime)<0)
|
|
|
+ if(DiffTimebWithNow(expiredTime)>0)
|
|
|
{
|
|
|
result = YES;
|
|
|
}
|
|
|
}
|
|
|
+ else
|
|
|
+ DEBUG_WARN("Expired date parsing error\r\n");
|
|
|
|
|
|
return result;
|
|
|
}
|
|
@@ -1492,6 +1494,9 @@ int main(void)
|
|
|
//==========================================
|
|
|
for(int gun_index = 0;gun_index<AC_QUANTITY;gun_index++)
|
|
|
{
|
|
|
+ // Assign connector location index for OCPP
|
|
|
+ ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].Index = gun_index;
|
|
|
+
|
|
|
// Alarm event check
|
|
|
if((ShmCharger->gun_info[gun_index].primaryMcuAlarm.InputAlarmCode>0))
|
|
|
{
|
|
@@ -2114,6 +2119,7 @@ int main(void)
|
|
|
* 1. LED control depend on relay status
|
|
|
* 2. check reservation is overtime?
|
|
|
*/
|
|
|
+ setLedMotion(gun_index,LED_ACTION_MAINTAIN);
|
|
|
}
|
|
|
|
|
|
if(isReservationExpired(gun_index) || ShmOCPP16Data->CsMsg.bits[gun_index].CancelReservationReq)
|