Skip to content

Commit 9931b0a

Browse files
restyled-commitsPeterC1965
authored andcommitted
Restyled by clang-format
1 parent 9d4d762 commit 9931b0a

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

src/app/clusters/device-energy-management-server/device-energy-management-server.cpp

+6-7
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,8 @@ void Instance::HandlePowerAdjustRequest(HandlerContext & ctx, const Commands::Po
324324
return;
325325
}
326326

327-
DataModel::Nullable<Structs::PowerAdjustCapabilityStruct::Type> powerAdjustmentCapabilityStruct = mDelegate.GetPowerAdjustmentCapability();
327+
DataModel::Nullable<Structs::PowerAdjustCapabilityStruct::Type> powerAdjustmentCapabilityStruct =
328+
mDelegate.GetPowerAdjustmentCapability();
328329
if (powerAdjustmentCapabilityStruct.IsNull())
329330
{
330331
ChipLogError(Zcl, "DEM: powerAdjustmentCapabilityStruct IsNull");
@@ -693,8 +694,7 @@ void Instance::HandleModifyForecastRequest(HandlerContext & ctx, const Commands:
693694
// NominalPower is only relevant if PFR is supported
694695
if (HasFeature(Feature::kPowerForecastReporting))
695696
{
696-
if (!slot.minPowerAdjustment.HasValue() ||
697-
!slot.maxPowerAdjustment.HasValue() ||
697+
if (!slot.minPowerAdjustment.HasValue() || !slot.maxPowerAdjustment.HasValue() ||
698698
slotAdjustment.nominalPower.Value() < slot.minPowerAdjustment.Value() ||
699699
slotAdjustment.nominalPower.Value() > slot.maxPowerAdjustment.Value())
700700
{
@@ -704,8 +704,7 @@ void Instance::HandleModifyForecastRequest(HandlerContext & ctx, const Commands:
704704
}
705705
}
706706

707-
if (!slot.minDurationAdjustment.HasValue() ||
708-
!slot.maxDurationAdjustment.HasValue() ||
707+
if (!slot.minDurationAdjustment.HasValue() || !slot.maxDurationAdjustment.HasValue() ||
709708
slotAdjustment.duration < slot.minDurationAdjustment.Value() ||
710709
slotAdjustment.duration > slot.maxDurationAdjustment.Value())
711710
{
@@ -748,7 +747,7 @@ void Instance::HandleRequestConstraintBasedForecast(HandlerContext & ctx,
748747
}
749748

750749
uint32_t currentUtcTime = 0;
751-
status = GetCurrentUtcTime(currentUtcTime);
750+
status = GetCurrentUtcTime(currentUtcTime);
752751
if (status != Status::Success)
753752
{
754753
ChipLogError(Zcl, "DEM: Forecast is Null");
@@ -848,7 +847,7 @@ void Instance::HandleRequestConstraintBasedForecast(HandlerContext & ctx,
848847

849848
void Instance::HandleCancelRequest(HandlerContext & ctx, const Commands::CancelRequest::DecodableType & commandData)
850849
{
851-
Status status = Status::Failure;
850+
Status status = Status::Failure;
852851
DataModel::Nullable<Structs::ForecastStruct::Type> forecast = mDelegate.GetForecast();
853852

854853
if (forecast.IsNull())

src/app/clusters/device-energy-management-server/device-energy-management-server.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ class Delegate
174174
virtual CHIP_ERROR SetESAType(ESATypeEnum) = 0;
175175
virtual CHIP_ERROR SetESACanGenerate(bool) = 0;
176176
virtual CHIP_ERROR SetESAState(ESAStateEnum) = 0;
177-
virtual CHIP_ERROR SetAbsMinPower(int64_t) = 0 ;
177+
virtual CHIP_ERROR SetAbsMinPower(int64_t) = 0;
178178
virtual CHIP_ERROR SetAbsMaxPower(int64_t) = 0;
179179
virtual CHIP_ERROR SetPowerAdjustmentCapability(DataModel::Nullable<Structs::PowerAdjustCapabilityStruct::Type>) = 0;
180180
virtual CHIP_ERROR SetForecast(DataModel::Nullable<Structs::ForecastStruct::Type>) = 0;

0 commit comments

Comments
 (0)