Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added optional is_precharge flag to send_charging_command #364

Merged
merged 1 commit into from
Jan 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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