Skip to content

Commit f33d005

Browse files
committed
Code format
1 parent 3f5c196 commit f33d005

File tree

3 files changed

+14
-11
lines changed

3 files changed

+14
-11
lines changed

src/chargepoint/smartcharging/SmartChargingManager.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -281,13 +281,13 @@ bool SmartChargingManager::handleMessage(const ocpp::messages::SetChargingProfil
281281
// Check if a transaction is in progress for the specific connector
282282
if (connector->transaction_id != 0)
283283
{
284-
if(request.csChargingProfiles.transactionId.isSet())
284+
if (request.csChargingProfiles.transactionId.isSet())
285285
{
286-
if(request.csChargingProfiles.transactionId.value() == connector->transaction_id)
287-
{
288-
// Add profile
289-
ret = true;
290-
}
286+
if (request.csChargingProfiles.transactionId.value() == connector->transaction_id)
287+
{
288+
// Add profile
289+
ret = true;
290+
}
291291
}
292292
else
293293
{

src/chargepoint/status/StatusManager.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ StatusManager::StatusManager(const ocpp::config::IChargePointConfig& sta
6565
m_registration_status(RegistrationStatus::Rejected),
6666
m_force_boot_notification(false),
6767
m_boot_notification_sent(false),
68-
m_boot_notification_timer(timer_pool, "Boot notification"),
68+
m_boot_notification_timer(timer_pool, "Boot notification"),
6969
m_heartbeat_timer(timer_pool, "Heartbeat")
7070
{
7171
m_boot_notification_timer.setCallback([this] { m_worker_pool.run<void>(std::bind(&StatusManager::bootNotificationProcess, this)); });
@@ -401,8 +401,8 @@ bool StatusManager::handleMessage(const ocpp::messages::ChangeAvailabilityReq& r
401401

402402
/** @brief Boot notification process thread */
403403
void StatusManager::bootNotificationProcess()
404-
{
405-
if(m_boot_notification_sent == false)
404+
{
405+
if (m_boot_notification_sent == false)
406406
{
407407
// Fill boot notification request
408408
BootNotificationReq boot_req;
@@ -416,14 +416,16 @@ void StatusManager::bootNotificationProcess()
416416
boot_req.meterSerialNumber.value().assign(m_stack_config.meterSerialNumber());
417417

418418
m_registration_status = RegistrationStatus::Rejected;
419+
419420
// Send BootNotificationRequest
420421
BootNotificationConf boot_conf;
421422
CallResult result = m_msg_sender.call(BOOT_NOTIFICATION_ACTION, boot_req, boot_conf);
422423
if (result == CallResult::Ok)
423424
{
424425
if (boot_conf.status == RegistrationStatus::Accepted)
425426
{
426-
m_boot_notification_sent = true;
427+
m_boot_notification_sent = true;
428+
427429
// Send first status notifications
428430
for (unsigned int id = 0; id <= m_connectors.getCount(); id++)
429431
{
@@ -441,7 +443,7 @@ void StatusManager::bootNotificationProcess()
441443
m_boot_notification_timer.start(std::chrono::seconds(boot_conf.interval), true);
442444
}
443445

444-
m_registration_status = boot_conf.status;
446+
m_registration_status = boot_conf.status;
445447
std::string registration_status = RegistrationStatusHelper.toString(m_registration_status);
446448
LOG_INFO << "Registration status : " << registration_status;
447449

src/chargepoint/status/StatusManager.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ class StatusManager
142142
ocpp::types::RegistrationStatus m_registration_status;
143143
/** @brief Indicate if the boot notification message must be inconditionnaly sent on connection */
144144
bool m_force_boot_notification;
145+
/** @brief Indicate if the boot notification message has been sent */
145146
bool m_boot_notification_sent;
146147
/** @brief Boot notification process timer */
147148
ocpp::helpers::Timer m_boot_notification_timer;

0 commit comments

Comments
 (0)