Browse Source

[Added][AW-CCS][main.c]
2022-03-31 / EASON YANG
Action
1. Added: When the system is under reservation mode logic for checkHandshakeCountdown() function.

FIle
1. main.c
Action 1

FIRMWARE VERSION: B0.61.XX.XXXX.PX

8009 3 years ago
parent
commit
ae62274e62
1 changed files with 8 additions and 0 deletions
  1. 8 0
      EVSE/Projects/AW-CCS/Apps/main.c

+ 8 - 0
EVSE/Projects/AW-CCS/Apps/main.c

@@ -4846,6 +4846,14 @@ void checkHandshakeCountdown(uint8_t gun_index)
 
 			ShmCharger->timeoutSpec.Handshake_Timeout = ((ocpp_get_connection_timeout()) - getDiffSecNow(startTime[gun_index][TMR_IDX_HANDSHAKING]));
 
+			break;
+		case SYS_MODE_RESERVATION:
+
+			if(ShmCharger->gun_info[ShmCharger->gun_selectd].isHandshakeTimerRefresh == YES)
+				refreshStartTimer(&startTime[0][TMR_IDX_GUN_DETECT]);
+			else
+				ShmCharger->timeoutSpec.Handshake_Timeout = ((ocpp_get_connection_timeout()) - (getDiffSecNow(startTime[0][TMR_IDX_GUN_DETECT])));
+
 			break;
 	}
 }