From 8ee5533d2e3928e943711fd98ed4ff33fe829f04 Mon Sep 17 00:00:00 2001 From: Shalin Nijel Date: Wed, 8 Jan 2025 11:47:15 +0000 Subject: [PATCH] Relax stateC requirement in PowerDelivery(15118-20) --- iso15118/secc/states/iso15118_20_states.py | 9 +++------ tests/iso15118_20/secc/test_iso15118_20_ac_states.py | 2 +- tests/iso15118_20/secc/test_iso15118_20_dc_states.py | 2 +- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/iso15118/secc/states/iso15118_20_states.py b/iso15118/secc/states/iso15118_20_states.py index 2f7aebd2..d0f8a873 100644 --- a/iso15118/secc/states/iso15118_20_states.py +++ b/iso15118/secc/states/iso15118_20_states.py @@ -1128,13 +1128,10 @@ async def process_message( # ms after sending the first PowerDeliveryReq with ChargeProgress # equals "Start" within V2G communication session. if not await self.wait_for_state_c_or_d(): - self.stop_state_machine( - "[V2G20-847]: State C/D not detected in PowerDelivery within" - " the allotted 250 ms.", - message, - ResponseCode.FAILED, + logger.warning( + "[V2G20-847]: C2/D2 CP state not detected after " + "250ms in PowerDelivery" ) - return if not await self.comm_session.evse_controller.is_contactor_closed(): self.stop_state_machine( diff --git a/tests/iso15118_20/secc/test_iso15118_20_ac_states.py b/tests/iso15118_20/secc/test_iso15118_20_ac_states.py index d260d743..4fb1aa48 100644 --- a/tests/iso15118_20/secc/test_iso15118_20_ac_states.py +++ b/tests/iso15118_20/secc/test_iso15118_20_ac_states.py @@ -1039,7 +1039,7 @@ async def test_15118_20_ac_charge_charge_loop_res_evse_context_read( ), ( ControlMode.DYNAMIC, - Terminate, + ACChargeLoop, SelectedEnergyService( service=ServiceV20.AC, is_free=True, parameter_set=None ), diff --git a/tests/iso15118_20/secc/test_iso15118_20_dc_states.py b/tests/iso15118_20/secc/test_iso15118_20_dc_states.py index 56bc3943..fd8e3838 100644 --- a/tests/iso15118_20/secc/test_iso15118_20_dc_states.py +++ b/tests/iso15118_20/secc/test_iso15118_20_dc_states.py @@ -1005,7 +1005,7 @@ async def test_15118_20_dc_charge_charge_loop_res_evse_context_read( ), ( ControlMode.DYNAMIC, - Terminate, + DCChargeLoop, SelectedEnergyService( service=ServiceV20.DC, is_free=True, parameter_set=None ),