Skip to content

Commit

Permalink
Dont persist unavailable on fw updates (#456)
Browse files Browse the repository at this point in the history
* Removed case in which inoperative could persist even if persist flag == false

---------

Signed-off-by: pietfried <[email protected]>
  • Loading branch information
Pietfried authored Feb 8, 2024
1 parent 06fcfa3 commit 051c685
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions lib/ocpp/v201/charge_point.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1489,15 +1489,7 @@ void ChargePoint::set_evse_connectors_unavailable(const std::unique_ptr<Evse>& e
uint32_t number_of_connectors = evse->get_number_of_connectors();

for (uint32_t i = 1; i <= number_of_connectors; ++i) {
bool should_persist = persist;
// TODO: Why is this condition here? What requirement does it fulfill?
if (!should_persist && evse->get_connector(static_cast<int32_t>(i))->get_effective_connector_status() ==
ocpp::v201::ConnectorStatusEnum::Unavailable) {
should_persist = true;
}

evse->set_connector_operative_status(static_cast<int32_t>(i), OperationalStatusEnum::Inoperative,
should_persist);
evse->set_connector_operative_status(static_cast<int32_t>(i), OperationalStatusEnum::Inoperative, persist);
}
}

Expand Down

0 comments on commit 051c685

Please sign in to comment.