Merge pull request #51 from mrbig/f/better_stop_handling

Treat DC Shutdown status as valid when STOP power delivery is requested
This commit is contained in:
Marc Mültin 2020-05-02 14:16:58 +02:00 committed by GitHub
commit b3ff868ad5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 3 deletions

View File

@ -151,9 +151,12 @@ public class WaitForPowerDeliveryReq extends ServerState {
dcEVSEStatusCode.equals(DCEVSEStatusCodeType.EVSE_SHUTDOWN) ||
dcEVSEStatusCode.equals(DCEVSEStatusCodeType.EVSE_EMERGENCY_SHUTDOWN) ||
dcEVSEStatusCode.equals(DCEVSEStatusCodeType.EVSE_MALFUNCTION)) {
getLogger().error("EVSE status code is '" + dcEVSEStatusCode.toString() + "'");
powerDeliveryRes.setResponseCode(ResponseCodeType.FAILED_POWER_DELIVERY_NOT_APPLIED);
return false;
getLogger().warn("EVSE status code is '" + dcEVSEStatusCode.toString() + "'");
if (!powerDeliveryReq.getChargeProgress().equals(ChargeProgressType.STOP)) {
powerDeliveryRes.setResponseCode(ResponseCodeType.FAILED_POWER_DELIVERY_NOT_APPLIED);
return false;
}
}
}