Skip to content

Commit

Permalink
Execute on changeavailability for connector 0 callback (EVerest#607)
Browse files Browse the repository at this point in the history
Signed-off-by: Matthias Suess <[email protected]>
Co-authored-by: Matthias Suess <[email protected]>
Signed-off-by: Daniel Moore <[email protected]>
  • Loading branch information
2 people authored and drmrd committed Jun 4, 2024
1 parent 44a3c7f commit 83b3ed5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/ocpp/v16/charge_point_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1355,14 +1355,14 @@ void ChargePointImpl::execute_connectors_availability_change(const std::vector<i
this->status->submit_event(connector, FSMEvent::BecomeAvailable, ocpp::DateTime());
}

if (connector != 0 and this->enable_evse_callback != nullptr) {
if (this->enable_evse_callback != nullptr) {
this->enable_evse_callback(connector);
}
} else {
if (connector == 0 or !evse_changed) {
this->status->submit_event(connector, FSMEvent::ChangeAvailabilityToUnavailable, ocpp::DateTime());
}
if (connector != 0 and this->disable_evse_callback != nullptr) {
if (this->disable_evse_callback != nullptr) {
this->disable_evse_callback(connector);
}
}
Expand Down

0 comments on commit 83b3ed5

Please sign in to comment.