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

fix: not all SessionEventEnum mapped to SessionInfo::State #593

Merged
merged 1 commit into from
Mar 19, 2024

Conversation

james-ctc
Copy link
Contributor

Describe your changes

The EVerest API session_info topic wasn't aways representing state since some cases in types::evse_manager::SessionEventEnum were missing from the if {...} else if {...} chain.
Moved to a switch so that analysis tools can spot future missing cases.

'PrepareCharging' was missing, included in the new switch.

Issue ticket number and link

Checklist before requesting a review

  • I have performed a self-review of my code
  • I have made corresponding changes to the documentation
  • I read the contribution documentation and made sure that my changes meet its requirements

The EVerest API session_info topic wasn't aways representing state
since some cases in types::evse_manager::SessionEventEnum were
missing from the if {...} else if {...} chain.
Moved to a switch so that analysis tools can spot future missing
cases.

'PrepareCharging' was missing, included in the new switch.

Signed-off-by: James Chapman <[email protected]>
@james-ctc james-ctc self-assigned this Mar 19, 2024
@james-ctc james-ctc marked this pull request as ready for review March 19, 2024 16:34
@hikinggrass hikinggrass merged commit 7a4aa61 into main Mar 19, 2024
5 checks passed
@hikinggrass hikinggrass deleted the fix/api-module-event-mapping branch March 19, 2024 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants