Browse Source

[Added][AW-CCS][main.c]
2022-10-17 / EASON YANG
Action:
1. Added: Added checkAvailability() function into Booting mode.
2. Added: Added Check isOperactive for statusNotification.

File:
1. main.c
Action 1
Action 2

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

8009 2 years ago
parent
commit
c438eee7e7
1 changed files with 16 additions and 1 deletions
  1. 16 1
      EVSE/Projects/AW-CCS/Apps/main.c

+ 16 - 1
EVSE/Projects/AW-CCS/Apps/main.c

@@ -6282,6 +6282,9 @@ int main(void)
 						// Firmware version
 						get_firmware_version(gun_index);
 
+						// Change availability check
+						checkAvailability(gun_index);
+
 						// OCPP BootNotification info set
 						DEBUG_INFO("==========================================\n");
 						DEBUG_INFO("System ID: %s\n",ShmSysConfigAndInfo->SysConfig.SystemId);
@@ -6348,9 +6351,21 @@ int main(void)
 
 						// If rotate switch equal zero, the system needs to change Debug mode
 						if(ShmCharger->gun_info[gun_index].primaryMcuState.rotatory_switch == 0)
+						{
 							setChargerMode(gun_index, SYS_MODE_DEBUG);
+						}
 						else
-							setChargerMode(gun_index, SYS_MODE_IDLE);
+						{
+							// Check is operactive
+							if(ShmCharger->gun_info[gun_index].isOperactive)
+							{
+								setChargerMode(gun_index, SYS_MODE_IDLE);
+							}
+							else
+							{
+								setChargerMode(gun_index, SYS_MODE_MAINTAIN);
+							}
+						}
 
 						// The system identifies 1 phase or 3 phases depending on the model name
 						ShmSysConfigAndInfo->SysConfig.AcPhaseCount = ((ShmSysConfigAndInfo->SysConfig.ModelName[2]=='Y') ||