-
Notifications
You must be signed in to change notification settings - Fork 100
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
Fix/set present #159
Fix/set present #159
Conversation
ikaratass
commented
Nov 10, 2022
- set_present_protocol_state method is awaitable.
iso15118/shared/comm_session.py
Outdated
if hasattr(self.comm_session, "evse_controller"): | ||
await self.comm_session.evse_controller.set_present_protocol_state( | ||
str(self.current_state) | ||
) | ||
# This will create the values needed for the next state, such as | ||
# next_state, next_v2gtp_message, next_message_payload_type etc. | ||
await self.process_message(message) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like it might suffice to call set_present_protocol_state once after the above self.process_message?
if hasattr(self.comm_session, "evse_controller"):
await self.comm_session.evse_controller.set_present_protocol_state(
# noqa
str(self.current_state)
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
iso15118/shared/comm_session.py
Outdated
if hasattr(self.comm_session, "evse_controller"): | ||
await self.comm_session.evse_controller.set_present_protocol_state( # noqa | ||
str(self.current_state.next_state.__name__) | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be removed as discussed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done