|
@@ -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') ||
|