|
@@ -778,7 +778,6 @@ int main(void)
|
|
|
printf("\n start: EVSE start charging request.");
|
|
|
printf("\n stop: EVSE stop charging request.");
|
|
|
printf("\n auth: Authorize request.");
|
|
|
- printf("\n ccs: CCS flow status.");
|
|
|
printf("\n alarm: Simulate alarm status.");
|
|
|
printf("\n cancel: return to main menu.");
|
|
|
printf("\n **************************************************");
|
|
@@ -827,52 +826,6 @@ int main(void)
|
|
|
ShmOCPP16Data->SpMsg.bits.AuthorizeReq = ON;
|
|
|
DEBUG_INFO("Test authentication by %s.\n", ShmSysConfigAndInfo->SysConfig.UserId);
|
|
|
}
|
|
|
- else if(strcmp(cmd, "ccs") == 0)
|
|
|
- {
|
|
|
- memset(cmd, 0x00, ARRAY_SIZE(cmd));
|
|
|
- printf("\n Please input gun index(1~2): ");
|
|
|
- scanf("%s", &cmd[0]);
|
|
|
-
|
|
|
- if((0 < atoi(cmd)) && (atoi(cmd) < 3))
|
|
|
- {
|
|
|
- uint8_t gun_index = atoi(cmd)-1;
|
|
|
- memset(cmd, 0x00, ARRAY_SIZE(cmd));
|
|
|
- printf("\n ***** ccs ****************************************");
|
|
|
- printf("\n ccs_hs_status: CCS hand shake status.");
|
|
|
- printf("\n cancel: return to main menu.");
|
|
|
- printf("\n **************************************************");
|
|
|
- printf("\n Please input operation item: ");
|
|
|
- scanf("%s", &cmd[0]);
|
|
|
-
|
|
|
- if(strcmp(cmd, "ccs_hs_status") == 0)
|
|
|
- {
|
|
|
- printf("\n ***** ccs_hs_status *******************************");
|
|
|
- printf("\n Current ccs_hs_status: %d", ShmCharger->gun_info[gun_index].ccsHandshakeState);
|
|
|
- printf("\n 1: HANDSHAKE_DUTY_5.");
|
|
|
- printf("\n 2: HANDSHAKE_DUTY_5_CHECK.");
|
|
|
- printf("\n 3: HANDSHAKE_CCS.");
|
|
|
- printf("\n 4: HANDSHAKE_CP_STATE_E.");
|
|
|
- printf("\n 5: HANDSHAKE_SET_MAX_CURRENT.");
|
|
|
- printf("\n 6: HANDSHAKE_BS_MODE.");
|
|
|
- printf("\n 7: HANDSHAKE_HLC_MODE.");
|
|
|
- printf("\n **************************************************");
|
|
|
- printf("\n Please input operation item: ");
|
|
|
- scanf("%s", &cmd[0]);
|
|
|
-
|
|
|
- if((0 < atoi(cmd)) && (atoi(cmd) < 9))
|
|
|
- {
|
|
|
- ShmCharger->gun_info[gun_index].ccsHandshakeState = atoi(cmd);
|
|
|
- DEBUG_INFO("Gun-%d CCS hand shake state: %d.\n", gun_index, ShmCharger->gun_info[gun_index].ccsHandshakeState);
|
|
|
- }
|
|
|
- else
|
|
|
- printf("\n Invalid hand shake state.");
|
|
|
- }
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- printf("\n Invalid input gun_index.");
|
|
|
- }
|
|
|
- }
|
|
|
else if(strcmp(cmd, "alarm") == 0)
|
|
|
{
|
|
|
memset(cmd, 0x00, ARRAY_SIZE(cmd));
|
|
@@ -885,8 +838,8 @@ int main(void)
|
|
|
|
|
|
while(1)
|
|
|
{
|
|
|
- ShmCharger->gun_info[atoi(cmd)-1].systemAlarmCode.SystemAlarmCode |= ALARM_L1_OVER_VOLTAGE;
|
|
|
- ShmCharger->gun_info[atoi(cmd)-1].primaryMcuAlarm.InputAlarmCode |= ALARM_L1_OVER_VOLTAGE;
|
|
|
+ ShmCharger->gun_info[atoi(cmd)-1].systemAlarmCode.SystemAlarmCode |= ALARM_OVER_VOLTAGE;
|
|
|
+ ShmCharger->gun_info[atoi(cmd)-1].primaryMcuAlarm.InputAlarmCode |= ALARM_OVER_VOLTAGE;
|
|
|
}
|
|
|
}
|
|
|
else
|