Browse Source

[Improvr][AW-Regular / AW-ChargeLab][main]

2021.06.28 / Folus Wen

Actions:
1. Call ocpp_set_profile_req() when system mode on SYS_MODE_TERMINATING.

Files:
1. As follow commit history

Image version: V0.69.XX.XXXX.XX
Image checksum: XXXXXXXX

Hardware PWB P/N : XXXXXXX
Hardware Version : XXXXXXX
FolusWen 3 years ago
parent
commit
ccb5fc9382
2 changed files with 28 additions and 0 deletions
  1. 14 0
      EVSE/Projects/AW-ChargeLab/Apps/main.c
  2. 14 0
      EVSE/Projects/AW-Regular/Apps/main.c

+ 14 - 0
EVSE/Projects/AW-ChargeLab/Apps/main.c

@@ -4536,6 +4536,20 @@ int main(void)
 							}
 						}
 
+						// Charging profile preparation
+						if(DiffTimebWithNow(startTime[gun_index][TMR_IDX_PROFILE_PREPARE]) > TIMEOUT_SPEC_PROFILE_PREPARE)
+						{
+							if(!ocpp_get_profile_conf(gun_index))
+							{
+								ocpp_set_profile_req(gun_index, ON);
+								ftime(&startTime[gun_index][TMR_IDX_PROFILE_PREPARE]);
+							}
+							else
+							{
+								ocpp_set_profile_conf(gun_index, OFF);
+							}
+						}
+
 						// Check target current if charging profile limit > 0
 						checkChargingProfileLimit(gun_index);
 						if(ShmCharger->gun_info[gun_index].targetCurrent > 0)

+ 14 - 0
EVSE/Projects/AW-Regular/Apps/main.c

@@ -4536,6 +4536,20 @@ int main(void)
 							}
 						}
 
+						// Charging profile preparation
+						if(DiffTimebWithNow(startTime[gun_index][TMR_IDX_PROFILE_PREPARE]) > TIMEOUT_SPEC_PROFILE_PREPARE)
+						{
+							if(!ocpp_get_profile_conf(gun_index))
+							{
+								ocpp_set_profile_req(gun_index, ON);
+								ftime(&startTime[gun_index][TMR_IDX_PROFILE_PREPARE]);
+							}
+							else
+							{
+								ocpp_set_profile_conf(gun_index, OFF);
+							}
+						}
+
 						// Check target current if charging profile limit > 0
 						checkChargingProfileLimit(gun_index);
 						if(ShmCharger->gun_info[gun_index].targetCurrent > 0)