Skip to content

Commit

Permalink
Checking supported_feature_profiles for CostAndPrice before attepting…
Browse files Browse the repository at this point in the history
… to get respective conigutation keys

Signed-off-by: Piet Gömpel <[email protected]>
  • Loading branch information
Pietfried committed Dec 23, 2024
1 parent 8d5ae96 commit d6dd017
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/ocpp/v16/charge_point_configuration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3289,12 +3289,12 @@ std::optional<KeyValue> ChargePointConfiguration::get(CiString<50> key) {
}
}

// California Pricing
if (key == "CustomDisplayCostAndPrice") {
return this->getCustomDisplayCostAndPriceEnabledKeyValue();
}
if (this->supported_feature_profiles.count(SupportedFeatureProfiles::CostAndPrice)) {
// California Pricing
if (key == "CustomDisplayCostAndPrice") {
return this->getCustomDisplayCostAndPriceEnabledKeyValue();
}

if (getCustomDisplayCostAndPriceEnabled()) {
if (key == "NumberOfDecimalsForCostValues") {
return this->getPriceNumberOfDecimalsForCostValuesKeyValue();
}
Expand Down

0 comments on commit d6dd017

Please sign in to comment.