소스 검색

[Improve][AW-CCS][main.c]
2022-10-25 / EASON YANG
Action:
1. Improve: Initialization() function. Replace qca7000 power on/off under Initialization() function.

File:
1. main.c
Action 1

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

8009 2 년 전
부모
커밋
d0f285e31b
1개의 변경된 파일12개의 추가작업 그리고 6개의 파일을 삭제
  1. 12 6
      EVSE/Projects/AW-CCS/Apps/main.c

+ 12 - 6
EVSE/Projects/AW-CCS/Apps/main.c

@@ -3194,6 +3194,18 @@ int Initialization(uint8_t gun_index)
 
 	ShmCharger->gun_info[gun_index].isOperactive = DB_Get_Operactive(localDb, gun_index);
 	ShmCharger->gun_info[gun_index].Ptb_Meter_Parameters.PtbMeterPermissionStatus = DB_Get_Meter_Permission(localDb, gun_index);
+	
+	// Check is ccs Enable/Disable to open ccs power.
+	if(ShmCharger->isCcsEnable == ON)
+	{
+		system("echo 1 > /sys/class/gpio/gpio115/value");
+		DEBUG_INFO("QCA7000: Power on. \n");
+	}
+	else
+	{
+		system("echo 0 > /sys/class/gpio/gpio115/value");
+		DEBUG_INFO("QCA7000: Power off. \n");
+	}
 
 	return result;
 }
@@ -6404,12 +6416,6 @@ int main(void)
 						// Refresh PTB resend timer
 						if(ShmSysConfigAndInfo->SysConfig.ModelName[3] == 'P')
 							refreshStartTimer(&startTime[gun_index][TMR_IDX_PTB_METER_SEND]);
-						
-						// Check is ccs Enable/Disable to open ccs power.
-						if(ShmCharger->isCcsEnable == ON)
-							system("echo 1 > /sys/class/gpio/gpio115/value");
-						else
-							system("echo 0 > /sys/class/gpio/gpio115/value");
 					}
 
 					break;