Skip to content

Commit

Permalink
method name changed to _is_charging_profile_valid
Browse files Browse the repository at this point in the history
  • Loading branch information
ikaratass committed Oct 28, 2022
1 parent 365143a commit 43420a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions iso15118/secc/states/iso15118_2_states.py
Original file line number Diff line number Diff line change
Expand Up @@ -1465,7 +1465,7 @@ async def process_message(
# to the chosen SAScheduleTuple element in the last ChargeParameterDiscoveryRes
# message sent by the SECC.
if power_delivery_req.charging_profile:
if not self._check_charging_profile(power_delivery_req):
if not self._is_charging_profile_valid(power_delivery_req):
self.stop_state_machine(
"[V2G2-225] ChargingProfile is not adhering to the Pmax values in "
"ChargeParameterDiscoveryRes",
Expand Down Expand Up @@ -1611,7 +1611,7 @@ async def check_state():
CpState.D2,
]

def _check_charging_profile(self, power_delivery_req: PowerDeliveryReq) -> bool:
def _is_charging_profile_valid(self, power_delivery_req: PowerDeliveryReq) -> bool:
for schedule in self.comm_session.offered_schedules:
if schedule.sa_schedule_tuple_id == power_delivery_req.sa_schedule_tuple_id:
schedule_entries = schedule.p_max_schedule.schedule_entries
Expand Down

0 comments on commit 43420a8

Please sign in to comment.