|
@@ -4629,6 +4629,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);
|
|
@@ -4663,9 +4666,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);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
break;
|