Skip to content

Commit

Permalink
Code format
Browse files Browse the repository at this point in the history
  • Loading branch information
c-jimenez committed Apr 11, 2024
1 parent 931b04c commit 452f152
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/chargepoint/reservation/ReservationManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ bool ReservationManager::handleMessage(const ocpp::messages::ReserveNowReq& requ
if (connector)
{
// Check if reservation is allowed on connector
if (((request.connectorId != 0) || ((request.connectorId == 0) && m_ocpp_config.reserveConnectorZeroSupported()))
&&( m_ocpp_config.supportedFeatureProfiles().find("Reservation")!= std::string::npos) )
if (((request.connectorId != 0) || ((request.connectorId == 0) && m_ocpp_config.reserveConnectorZeroSupported())) &&
(m_ocpp_config.supportedFeatureProfiles().find("Reservation") != std::string::npos))
{
std::lock_guard<std::mutex> lock(connector->mutex);

Expand Down
9 changes: 6 additions & 3 deletions src/chargepoint/smartcharging/SmartChargingManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -362,16 +362,19 @@ bool SmartChargingManager::handleMessage(const ocpp::messages::GetCompositeSched
if (m_ocpp_config.chargingScheduleAllowedChargingRateUnit().find("Power") != std::string::npos)
{
charging_rate_unit = types::ChargingRateUnitType::W;
} else
}
else
{
charging_rate_unit = types::ChargingRateUnitType::A;
}
} else {
}
else
{
charging_rate_unit = request.chargingRateUnit.value();
}

LOG_INFO << "GetCompositeSchedule requested : connectorId = " << request.connectorId << " - duration = " << request.duration
<< " - chargingRateUnit = " << ChargingRateUnitTypeHelper.toString(charging_rate_unit)
<< " - chargingRateUnit = " << ChargingRateUnitTypeHelper.toString(charging_rate_unit)
<< (!request.chargingRateUnit.isSet() ? " (from allowed charging unit)" : "");

// Lock profiles
Expand Down
2 changes: 1 addition & 1 deletion src/websockets/libwebsockets/LibWebsocketClientPool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ void LibWebsocketClientPool::process()

// Dummy vhost to handle context related events
struct lws_protocols protocols[] = {{"LibWebsocketClientPool", &LibWebsocketClientPool::eventCallback, 0, 0, 0, this, 0},
LWS_PROTOCOL_LIST_TERM};
LWS_PROTOCOL_LIST_TERM};
struct lws_context_creation_info vhost_info;
memset(&vhost_info, 0, sizeof(vhost_info));
vhost_info.protocols = protocols;
Expand Down

0 comments on commit 452f152

Please sign in to comment.