Skip to content

Commit

Permalink
Restyled by clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
restyled-commits authored and PeterC1965 committed Jun 6, 2024
1 parent 9d4d762 commit 9931b0a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,8 @@ void Instance::HandlePowerAdjustRequest(HandlerContext & ctx, const Commands::Po
return;
}

DataModel::Nullable<Structs::PowerAdjustCapabilityStruct::Type> powerAdjustmentCapabilityStruct = mDelegate.GetPowerAdjustmentCapability();
DataModel::Nullable<Structs::PowerAdjustCapabilityStruct::Type> powerAdjustmentCapabilityStruct =
mDelegate.GetPowerAdjustmentCapability();
if (powerAdjustmentCapabilityStruct.IsNull())
{
ChipLogError(Zcl, "DEM: powerAdjustmentCapabilityStruct IsNull");
Expand Down Expand Up @@ -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())
{
Expand All @@ -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())
{
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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<Structs::ForecastStruct::Type> forecast = mDelegate.GetForecast();

if (forecast.IsNull())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Structs::PowerAdjustCapabilityStruct::Type>) = 0;
virtual CHIP_ERROR SetForecast(DataModel::Nullable<Structs::ForecastStruct::Type>) = 0;
Expand Down

0 comments on commit 9931b0a

Please sign in to comment.