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

Adding ISO15118-20 dynamic mode support #912

Merged
merged 6 commits into from
Nov 14, 2024

Conversation

SebaLukas
Copy link
Contributor

Describe your changes

This PR adds with this libiso15118 Adding basic dynamic mode PR a basic support for ISO15118-20 dynamic mode.

Issue ticket number and link

Right now only a basic scheduled mode in the Evse15118D20 module was supported.

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

dependencies.yaml Outdated Show resolved Hide resolved
dependencies.yaml Outdated Show resolved Hide resolved
@SebaLukas SebaLukas force-pushed the feat/adding-d20-dynamic-mode-support branch 2 times, most recently from eac396e to b05bdb0 Compare November 12, 2024 08:20
modules/Evse15118D20/charger/ISO15118_chargerImpl.cpp Outdated Show resolved Hide resolved
modules/Evse15118D20/charger/ISO15118_chargerImpl.cpp Outdated Show resolved Hide resolved
Comment on lines +415 to +418
const double latest_target_power = latest_target_voltage * latest_target_current;

if (latest_target_power <= PRE_CHARGE_MAX_POWER or values.min_charge_power > latest_target_power or
values.max_charge_power < latest_target_power) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would do something like:

const auto latest_target_needs_update = [] (latest_target_voltage, latest_target_current) {
  constexpr static auto PRE_CHARGE_MAX_POWER = ...;
  const double power = .. x ...;
  return (power <= PRE_CH.. or ... or ..);
}

if (latest_target_needs_update(latest_target_voltage, latest_target_current) {
...

just in order to give some more appropriate name to the more complex if condition because it is just not easy to reason what this is doing

types/iso15118_charger.yaml Outdated Show resolved Hide resolved
D20 dynamic mode works now for IsoMux

Signed-off-by: Sebastian Lukas <[email protected]>
Signed-off-by: Sebastian Lukas <[email protected]>
…max limits in scheduled mode

Signed-off-by: Sebastian Lukas <[email protected]>
Signed-off-by: Sebastian Lukas <[email protected]>
Signed-off-by: Sebastian Lukas <[email protected]>
@SebaLukas SebaLukas force-pushed the feat/adding-d20-dynamic-mode-support branch from 1e60700 to f7cd464 Compare November 13, 2024 17:07
@SebaLukas SebaLukas merged commit a9382ec into main Nov 14, 2024
10 of 11 checks passed
@SebaLukas SebaLukas deleted the feat/adding-d20-dynamic-mode-support branch November 14, 2024 07:11
barsnick pushed a commit to chargebyte/everest-core that referenced this pull request Nov 14, 2024
* Adding D20 dynamic mode support
* Adding publish_dc_ev_max_limits call when the ev wants to change the max limits in scheduled mode

Signed-off-by: Sebastian Lukas <[email protected]>
hikinggrass pushed a commit that referenced this pull request Nov 21, 2024
* Adding D20 dynamic mode support
* Adding publish_dc_ev_max_limits call when the ev wants to change the max limits in scheduled mode

Signed-off-by: Sebastian Lukas <[email protected]>
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.

3 participants