From 9931b0a42d55c337475a5dba5a8ac693afe75d9b Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Thu, 6 Jun 2024 09:15:49 +0000 Subject: [PATCH] Restyled by clang-format --- .../device-energy-management-server.cpp | 13 ++++++------- .../device-energy-management-server.h | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/app/clusters/device-energy-management-server/device-energy-management-server.cpp b/src/app/clusters/device-energy-management-server/device-energy-management-server.cpp index 2b42c74369cdcd..8e609813012024 100644 --- a/src/app/clusters/device-energy-management-server/device-energy-management-server.cpp +++ b/src/app/clusters/device-energy-management-server/device-energy-management-server.cpp @@ -324,7 +324,8 @@ void Instance::HandlePowerAdjustRequest(HandlerContext & ctx, const Commands::Po return; } - DataModel::Nullable powerAdjustmentCapabilityStruct = mDelegate.GetPowerAdjustmentCapability(); + DataModel::Nullable powerAdjustmentCapabilityStruct = + mDelegate.GetPowerAdjustmentCapability(); if (powerAdjustmentCapabilityStruct.IsNull()) { ChipLogError(Zcl, "DEM: powerAdjustmentCapabilityStruct IsNull"); @@ -693,8 +694,7 @@ void Instance::HandleModifyForecastRequest(HandlerContext & ctx, const Commands: // NominalPower is only relevant if PFR is supported if (HasFeature(Feature::kPowerForecastReporting)) { - if (!slot.minPowerAdjustment.HasValue() || - !slot.maxPowerAdjustment.HasValue() || + if (!slot.minPowerAdjustment.HasValue() || !slot.maxPowerAdjustment.HasValue() || slotAdjustment.nominalPower.Value() < slot.minPowerAdjustment.Value() || slotAdjustment.nominalPower.Value() > slot.maxPowerAdjustment.Value()) { @@ -704,8 +704,7 @@ void Instance::HandleModifyForecastRequest(HandlerContext & ctx, const Commands: } } - if (!slot.minDurationAdjustment.HasValue() || - !slot.maxDurationAdjustment.HasValue() || + if (!slot.minDurationAdjustment.HasValue() || !slot.maxDurationAdjustment.HasValue() || slotAdjustment.duration < slot.minDurationAdjustment.Value() || slotAdjustment.duration > slot.maxDurationAdjustment.Value()) { @@ -748,7 +747,7 @@ void Instance::HandleRequestConstraintBasedForecast(HandlerContext & ctx, } uint32_t currentUtcTime = 0; - status = GetCurrentUtcTime(currentUtcTime); + status = GetCurrentUtcTime(currentUtcTime); if (status != Status::Success) { ChipLogError(Zcl, "DEM: Forecast is Null"); @@ -848,7 +847,7 @@ void Instance::HandleRequestConstraintBasedForecast(HandlerContext & ctx, void Instance::HandleCancelRequest(HandlerContext & ctx, const Commands::CancelRequest::DecodableType & commandData) { - Status status = Status::Failure; + Status status = Status::Failure; DataModel::Nullable forecast = mDelegate.GetForecast(); if (forecast.IsNull()) diff --git a/src/app/clusters/device-energy-management-server/device-energy-management-server.h b/src/app/clusters/device-energy-management-server/device-energy-management-server.h index 7557871f48c3dd..cad3abc3db5a92 100644 --- a/src/app/clusters/device-energy-management-server/device-energy-management-server.h +++ b/src/app/clusters/device-energy-management-server/device-energy-management-server.h @@ -174,7 +174,7 @@ class Delegate virtual CHIP_ERROR SetESAType(ESATypeEnum) = 0; virtual CHIP_ERROR SetESACanGenerate(bool) = 0; virtual CHIP_ERROR SetESAState(ESAStateEnum) = 0; - virtual CHIP_ERROR SetAbsMinPower(int64_t) = 0 ; + virtual CHIP_ERROR SetAbsMinPower(int64_t) = 0; virtual CHIP_ERROR SetAbsMaxPower(int64_t) = 0; virtual CHIP_ERROR SetPowerAdjustmentCapability(DataModel::Nullable) = 0; virtual CHIP_ERROR SetForecast(DataModel::Nullable) = 0;