Skip to content

Commit

Permalink
Add is_precharge flag to send_charging_command (#364)
Browse files Browse the repository at this point in the history
  • Loading branch information
shalinnijel2 authored Jan 22, 2024
1 parent ebe59ca commit aeb48d8
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions iso15118/secc/controller/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -727,6 +727,7 @@ async def send_charging_command(
self,
ev_target_voltage: Optional[float],
ev_target_current: Optional[float],
is_precharge: bool = False,
is_session_bpt: bool = False,
):
"""
Expand Down
1 change: 1 addition & 0 deletions iso15118/secc/controller/simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -879,6 +879,7 @@ async def send_charging_command(
self,
ev_target_voltage: Optional[float],
ev_target_current: Optional[float],
is_precharge: bool = False,
is_session_bpt: bool = False,
):
pass
Expand Down
1 change: 1 addition & 0 deletions iso15118/secc/states/din_spec_states.py
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,7 @@ async def process_message(
await self.comm_session.evse_controller.send_charging_command(
ev_data_context.target_voltage,
ev_data_context.target_current,
is_precharge=True,
)
except asyncio.TimeoutError:
self.stop_state_machine(
Expand Down
3 changes: 1 addition & 2 deletions iso15118/secc/states/iso15118_20_states.py
Original file line number Diff line number Diff line change
Expand Up @@ -1697,8 +1697,7 @@ async def process_message(
try:
# Current is set to 0 as that is not used for PreCharge
await self.comm_session.evse_controller.send_charging_command(
ev_data_context.target_voltage,
0,
ev_data_context.target_voltage, 0, is_precharge=True
)
except asyncio.TimeoutError:
self.stop_state_machine(
Expand Down
1 change: 1 addition & 0 deletions iso15118/secc/states/iso15118_2_states.py
Original file line number Diff line number Diff line change
Expand Up @@ -2358,6 +2358,7 @@ async def process_message(
await self.comm_session.evse_controller.send_charging_command(
ev_data_context.target_voltage,
ev_data_context.target_current,
is_precharge=True,
)
except asyncio.TimeoutError:
self.stop_state_machine(
Expand Down

0 comments on commit aeb48d8

Please sign in to comment.