Skip to content

Commit

Permalink
Fix the power DC mode spurious Import (#821)
Browse files Browse the repository at this point in the history
DC PowerSupply is not falsely set to import. Fixing dc charging session.

Signed-off-by: florinmihut <[email protected]>
Signed-off-by: Sebastian Lukas <[email protected]>
Co-authored-by: Sebastian Lukas <[email protected]>
  • Loading branch information
florinmihut and SebaLukas authored Aug 8, 2024
1 parent a889fb2 commit 1cd809c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.14.7)

project(everest-core
VERSION 2024.7.0
VERSION 2024.7.1
DESCRIPTION "The open operating system for e-mobility charging stations"
LANGUAGES CXX C
)
Expand Down
13 changes: 5 additions & 8 deletions modules/EvseManager/EvseManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1558,9 +1558,8 @@ bool EvseManager::powersupply_DC_set(double _voltage, double _current) {

auto caps = get_powersupply_capabilities();

if ((((config.hack_allow_bpt_with_iso2 or config.sae_j2847_2_bpt_enabled) and is_actually_exporting_to_grid) or
charging_phase_changed) and
current_demand_active) {
if (((config.hack_allow_bpt_with_iso2 or config.sae_j2847_2_bpt_enabled) and current_demand_active) and
is_actually_exporting_to_grid) {
if (not last_is_actually_exporting_to_grid) {
// switching from import from grid to export to grid
session_log.evse(false, "DC power supply: switch ON in import mode");
Expand Down Expand Up @@ -1594,11 +1593,9 @@ bool EvseManager::powersupply_DC_set(double _voltage, double _current) {
return false;

} else {

if ((((config.hack_allow_bpt_with_iso2 or config.sae_j2847_2_bpt_enabled) and
last_is_actually_exporting_to_grid) or
charging_phase_changed) and
current_demand_active) {
if (charging_phase_changed or (((config.hack_allow_bpt_with_iso2 or config.sae_j2847_2_bpt_enabled) and
last_is_actually_exporting_to_grid) and
current_demand_active)) {
// switching from export to grid to import from grid
session_log.evse(false, "DC power supply: switch ON in export mode");
r_powersupply_DC[0]->call_setMode(types::power_supply_DC::Mode::Export, power_supply_DC_charging_phase);
Expand Down

0 comments on commit 1cd809c

Please sign in to comment.